r/Python • u/AdMammoth8075 • 4h ago
News I Built A C++ Powered Python Library Using pybind11 - way faster than python loops
Hey everyone, I just published my first C++ powered Python library on PyPI (kaptandanuj-easyhelper) to see how much faster list operations get when you move the loop from Python to C++.
Right now it has an order-preserving unique() function for int, float, and str lists. Under the hood it uses a templated C++ std::vector + std::unordered_set with reserve() pre-allocation, bound with pybind11.
On a list of 100k items, it beats a normal Python for loop + set()
Here how you install it
pip install kaptandanuj-easyhelper