3 ms·
> The Python implementations (which used Cython for a few tiny performance critical sections) ended up running much, much faster than the C++ projects (which we
by saagarjha 7y ago
> The Python implementations (which used Cython for a few tiny performance critical sections) ended up running much, much faster than the C++ projects (which were written by very veteran C++ engineers at the time). More than that, they were easier to test, easier to modify
I’m honestly really surprised. Can you provide some more detail as to how Python was beneficial for these?
- mlthoughts2018 7y agoIt allowed me to write Cython for only small pieces of programs for which there is profiling evidence of a performance bottleneck. Cython is a slight superset of Python that compiles to heavily optimized C or C++. So it is extremely easy to write & autogenerate Python bindings to your own C extension modules. The difference is that it frees you to write Python (much easier to write & maintain) for everything, and only care about compiling down for speed in a few isolated places. Contrasted with writing everything in C/C++, this is a big advantage.