5 ms·
Well a naive Python solution would be much slower than the Numpy one, so...
by emteycz 4y ago
Well a naive Python solution would be much slower than the Numpy one, so...
- throwaway894345 4y agoSometimes this is true, and the parent's criticism is certainly unhelpful. That said, I've definitely seen people try to optimize with numpy and end up with something that's even slower (Numpy isn't a substitute for mechanical sympathy, but it's often treated as magic dust by the Python community). Basically Python performance is just a hot mess all around. :(
- robertlagrant 4y agoI guess I'm the OP. Sorry my comment didn't help you; please let me know what you need.
- deleted 4y ago[deleted]
- DeathArrow 4y ago>Basically Python performance is just a hot mess all around. Maybe don't use Python where performance matters? Just a thought.
- throwaway894345 4y agoThat's the right answer, but it's not helpful for people who don't get to make the call on what language to use. Moreover, a lot of people don't think an application will have a performance problem until suddenly it does (either because of scale or shifting requirements or whatever). Even worse, a whole lot of people simplistically believe that you can just throw C/multiprocessing/numpy at any Python performance problem, which is how you make Python even slower and less maintainable.