3 ms·
Bear in mind that this is only applicable if your code is very CPU-bound. If it's IO-bound as many applications are these days, then this is for all intents an
by j_baker 16y ago
Bear in mind that this is only applicable if your code is very CPU-bound. If it's IO-bound as many applications are these days, then this is for all intents and purposes a non-issue.
- stcredzero 16y agoIt's been a non-issue for almost a decade!
- swolchok 16y agoThis is a non-statement -- if the code is IO-bound, then of course CPU performance is not a problem (except for things like, say, power usage, but we'll ignore that). The "power" of Python is to make code that should be IO-bound CPU-bound. Speaking as someone who loves Python and uses it all the time, but has spent a lot of time learning to love Cython in recent months. A nice feature of Cython (psychologically speaking, at least) that is missing in Python is the power to say that dammit, certain constants are constant, will never be changed, and can be inlined instead of having a hash table lookup every single time.
- j_baker 16y agoI think it's more accurate to say that it's a truism. Unfortunately, it's one that a lot of people forget.