Would be handy to have this in C++ as well. Then one could make the Python version an interface to the C++ one for lower overhead.