Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

WTF is up with python?

Name: Anonymous 2007-04-22 19:03 ID:QUkGtLGA

x = 0
while x < 100000000:
  x += 1

the above code takes ~35 seconds to run on my computer. WTF???

Name: Anonymous 2007-04-24 7:04 ID:u84xehVB

>>17
Naturally, it won't improve C extensions (which are supposed to be fast), and it won't improve I/O operations themselves (which are the same from any language). IIRC, it won't improve some features such as lambads either. But it will improve most of your Python code. If you saw a 15% performance increase instead of a 200%, then perhaps the same application written in C wouldn't be so much faster either. It's the kind of thing you're doing what cannot be optimized as much. Microbenchmarks or not, other applications such as those that rely on a lot of Python code for Maths will get a massive performance increase.

And 15% is not bad at all, considering you get free extra performance without (virtually) any modifications to your source code and working in a highly dynamic language which is well over a dozen times more productive than C or C++. Quit complaining.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List