3 ms·
That's usually the point at which I decide the project could really use being rewritten in C. If I need performance badly enough that I'm considering making ma
by Nursie 14y ago
That's usually the point at which I decide the project could really use being rewritten in C.
If I need performance badly enough that I'm considering making major structural changes in order to utilise multi-process or find some other way around the GIL, I probably ought to be considering using a language that supports what I'm trying to do.
Of course my python projects tend to be fairly small.
- smeg 14y agoOr just write the fast bits in C, call it from Python via ctypes and get the GIL unlocked and parallelism for free.
- Nursie 14y agoIf my projects were large enough to make that a more attractive option, sure, that's a great plan. Usually when I've hit this situation I'm writing something simple but processor intensive, and it's easier for me (12 years commercial parallel/distributed C programming, amateur python enthusiast) to go back to home ground at this point.