3 ms·
"Such difference is not impossible between languages" You are correct in wanted to make sure the algorithms and data-structures used still have the same run-tim
by voidlogic 14y ago
"Such difference is not impossible between languages" You are correct in wanted to make sure the algorithms and data-structures used still have the same run-time complexity. But saying this is impossible is not accurate.
This kind of difference is not uncommon when BOTH the before and after program optimally handle IO (network,file,db,etc), BUT the before program is from the interpreted performance tier (PHP,Perl,Ruby,Python) and the after program is from the compiler tier (C/C++,Java,C#,Go,Scala,Haskell).
These micro-benchmarks, while not proving anything, at least suggest that you could be wrong as well: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=python3 http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
- viraptor 14y agoWe're in a complete agreement. As I wrote: "Such difference is -not- impossible between languages" :) I just find it rather unlikely.
- voidlogic 14y agoYou find it unlikely that a compiled language might be 15x faster than a interpreted language doing a compute-bound workload, when said compiled language is often 30x faster in posted synthetic benchmarks... I think you are extremely skeptical... I have ported node.js applications to Go and seen similar substantial speedups. In my cases though I was running in a multi-threading enviroment. not GAE and the performance difference (improvement) was much greater under concurrent load versus single request latency. But that seems reasonable since node.js is closer to Go in performance than Python is. I guess I just believe it because I have seen it. :)
- igouy 14y ago>>posted synthetic benchmarks<< The benchmarks game shows toy programs not synthetic benchmarks ;-)
- drivebyacct2 14y agoYou find it unlikely a compiled language is faster than an interpreted one...?
- gngeal 14y agoSometimes, with smart data structures for specialized cases (persistency, better asymptotic behaviour etc.), it can happen that memory accesses dominate the actual execution. If that happens, and you can't saturate CPU's execution units, the difference between an efficient interpreter and a compiler gets smeared very quickly.
- Evbn 14y agoPython is compiled. That is the c in .pyc
- drivebyacct2 14y agoSorta, not really the point though. http://stackoverflow.com/questions/2998215/if-python-is-interpreted-what-are-pyc-files http://stackoverflow.com/questions/2998215/if-python-is-inte...