How To Install python-blist on CentOS 7

In this tutorial we learn how to install python-blist on CentOS 7. python-blist is A faster list implementation for Python

Introduction

In this tutorial we learn how to install python-blist on CentOS 7.

What is python-blist

The blist is a drop-in replacement for the Python list that provides better performance when modifying large lists. The blist package also provides sortedlist, sortedset, weaksortedlist, weaksortedset, sorteddict, and btuple types. Python’s built-in list is a dynamically-sized array; to insert or remove an item from the beginning or middle of the list, it has to move most of the list in memory, i.e., O(n) operations. The blist uses a flexible, hybrid array/tree structure and only needs to move a small portion of items in memory, specifically using O(log n) operations. For small lists, the blist and the built-in list have virtually identical performance.

We can use yum or dnf to install python-blist on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install python-blist.

Install python-blist on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install python-blist using yum by running the following command:

sudo yum -y install python-blist

Install python-blist on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install python-blist using dnf by running the following command:

sudo dnf -y install python-blist

How To Uninstall python-blist on CentOS 7

To uninstall only the python-blist package we can use the following command:

sudo dnf remove python-blist

References

Summary

In this tutorial we learn how to install python-blist on CentOS 7 using yum and dnf.