4 ms·
> Given that most of the computationally expensive work in Python is usually offloaded to C extensions That only works if your application's hotspots are in a
by adwn 6y ago
> Given that most of the computationally expensive work in Python is usually offloaded to C extensions
That only works if your application's hotspots are in a few, decoupled parts of your code – good examples are FFTs, data compression, or encryption. It doesn't work if you can't cleanly separate your hotspots from the rest of your logic. E.g., if you write a parser and analyzer for a programming language, what part do you want to offload to C? Even if you could identify a small part that takes up the majority of execution time, it would have a complex interface, and it would take a lot of work implementing and testing that interface.