Python is... slow?

An interesting blog post and comment thread.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

reminds me of a very similar

reminds me of a very similar experience when i had just discovered perl. i wrote some code in that language to convolve (in 3 dimensions, i believe) some large data sets. and started it running. and waited. and waited some more. and then wrote, debugged, and successfully ran, the same code in fortran, before the perl code finished.

i also recently got a factor of 100 improvement in speed while optimising some ocaml code. admittedly, the original code was rather stupid (but when you're spoiled by lazy languages...). that was the first time i'd used ocaml's (unix's (?)) tracing tools in earnest, and i was pretty impressed. not pretty, but you can soon work out what's happening.

New python optimization technique

I'd file this under you-can-get-Python-to-run-faster-if-you-blogged-that-it-was-slow.

<grin>

What can a compiler do

File this under - "The language you know is quicker than the language you don't know..."

Or - without an optimizing compiler you have to manually optimize the code

Or - without an optimizing co

Or - without an optimizing compiler you have to manually optimize the code

Even with an excellent optimizing compiler, algorithmic optimizations (aka manual optimizations) will still be necessary and will still be where most of your speed comes from.

Premature optimization...

...is the CAR of all evil?

algorithmic optimizations... will still be necessary

May be necessary ;-)

algorithmic optimizations...

...will certainly be necessarily soon enough. Which algorithms in particular will need to be optimized won't be discovered until your program has been used by at least three other people. (Is this one of the Alan Perlis rules of three?)