4 ms·
It is quite lightweight, yes! Though...I wouldn't necessarily call Python slow! Python keeps getting faster, and we now support Python 3.7 on our second gen ru
by buss 8y ago
It is quite lightweight, yes!
Though...I wouldn't necessarily call Python slow! Python keeps getting faster, and we now support Python 3.7 on our second gen runtimes: https://cloud.google.com/blog/products/gcp/introducing-app-engine-second-generation-runtimes-and-python-3-7 https://cloud.google.com/blog/products/gcp/introducing-app-e...
- melling 8y agoDoes anyone have numbers to compare? Go is a compiled language. Should perform much better. Python might be perfectly acceptable of course.
- tomcam 8y agoI would absolutely love those numbers too. Always wondered about the working set of a minimal program, and also one with database access.
- pkroll 8y agoWell, there's the Techempower benchmarks at: https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/ You can go to the filter, turn off all languages but Go and Python, and get a general idea. There's also the old Computer Benchmark Game, which should be taken with a whole barrel of salt: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-python3.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- eiieirurjdndjd 8y agoI actually looked at this before making my other comment. You’re absolutely right about the salt. One of the go benchmarks is basically pure cgo using vector intrinsics. It naturally blows idiomatic JS out of the water. So you might get those kind of results if that’s the kind of code you’re going to write, but it’s far from what I consider idiomatic. Another language’s proponent would be fair to point out that most languages have C FFIs.
- igouy 8y ago> One of the go benchmarks is Which program? URL?
- eiieirurjdndjd 8y agohttps://benchmarksgame-team.pages.debian.net/benchmarksgame/program/pidigits-go-3.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... It’s fifty percent faster than the competing java program.
- igouy 8y agoThat Go pi-digits program is 50% faster than a Java program that also uses the GMP library, just like the Go program! That Go pi-digits program is only 4% faster than a PHP program that uses the GMP library. It's not enough to "point out that most languages have C FFIs" when for this arbitrary precision arithmetic task GMP is allowed and others step-up and contribute those programs.
- eiieirurjdndjd 8y agoI see. I had only looked at the source code of the Nodejs competitor. To be fair the point still stands that you need to read the source to know what is really being measured.
- igouy 8y agoOf course you need to read the source code to know what is really being measured! That's true of every comparison -- basic due diligence. And read how the measurements were made -- https://benchmarksgame-team.pages.debian.net/benchmarksgame/how-programs-are-measured.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... And read some background -- https://benchmarksgame-team.pages.debian.net/benchmarksgame/dont-jump-to-conclusions.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... And, of course, look for a task that might be appropriate -- https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/summary.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y agoNo, there's no reason to take the benchmarks game with even a pinch of salt! The benchmarks game website shows what it says it shows -- "Which programs are faster? Will your toy benchmark program be faster if you write it in a different programming language? It depends how you write it!"
- igouy 8y ago(No, there's no reason to add even a pinch of salt to the benchmarks game website).