← Back to context

Comment by auntienomen

1 month ago

Cython. Writes like Python, runs like C. Strangely underappreciated.

It certainly doesn’t run like C. I once thought to port my JSM machine learning engine to python and it felt Cython might just be what I needed. Simply put it’s tight loops doing bitwise ops on bit-vectors. In reality no amount of adding type annotations would help the thing was slower then C++ by an order of magnitude.

  • I've generally found it to be within a factor of 2 of hand-tuned C. (It's literally autogenerated C.) But implementation matters, and I doubt we're going to check your work here in the comments.