ported some #Python to #C and #CPlusPlus (just the inner loops, most of the Pyth...
claude @mathr@post.lurk.org
ported some #Python to #C and #CPlusPlus (just the inner loops, most of the Python code was untouched), invoking it from Python using subprocess. tricky part was matching the output of the random module when seeded (actually generating random numbers was already a Mersenne Twister implemented in C), but I succeeded when the seed is an integer that fits in uint64_t (only case I cared about).
end result: 50x reduction in run time (over an hour -> under two minutes). this will make my experience much more pleasant