This would provide a significant speedup as loops currently are used in the python implementation. Its easy to compile such an small function reliably upon `pip install`