5 ms·
Insane, because it relies on the zip implementation detail. If you cared about a measly factor of 4 in performance you wouldn't be using python anyway.
by lmm 13y ago
Insane, because it relies on the zip implementation detail. If you cared about a measly factor of 4 in performance you wouldn't be using python anyway.
- icebraining 13y agoIt's not an implementation detail, the order is guaranteed by the spec.
- Goopplesoft 13y ago> by the spec by the implementation you mean. See: http://stackoverflow.com/questions/1094961/is-there-a-python-language-specification http://stackoverflow.com/questions/1094961/is-there-a-python...
- nsmartt 13y agoAs mentioned by others, the documentation for zip explicitly mentions this as a Python idiom: http://docs.python.org/2/library/functions.html#zip http://docs.python.org/2/library/functions.html#zip
- techdragon 13y agoAny developer can care about performance. And should never be mocked for achieving above 200% performance compared to an alternative implementation... Let alone 400% performance compared to the alternatives.
- lmm 13y agoIf that 400% performance improvement was achieved by sacrificing code readability, on a project that has deliberately chosen to prioritize readability over performance, then yes they should be mocked. Or at least told not to do it.