Welcome to hirola!¶
∘ MIT license ∘ PyPI ∘ Documentation ∘ Source code ∘ Bug reports ∘ Support
NumPy vectorized hash table written in C for fast (see benchmarks) set
/dict
like operations. A hirola.HashTable
is to dict
what numpy.array
is
to list
. By imposing some constraints, vectorising, and translating into C,
the speed can be improved dramatically.
Hirola serves as an extension of numpy.unique() and a
very light (20-30KB download size) and much faster alternative to
pandas.Categorical().
The constraints that Hirola imposes over normal set()
and dict()
are
similar to NumPy’s constraints against list()
. These constraints are:
Keys must all be of the same predetermined type and size.
The maximum size of a table must be chosen in advance and managed explicitly.
To get any performance boost, operations should be done in bulk.
Elements can not be removed.
If any of the above are not satisfied for your use case then don’t use hirola.