speed-optimized Python module for integer math