3 ms·
I know of the techempower benchmarks. You'll notice that the go results that end up scoring highly are using "atreugo", a customized low allocation implementati
by apta 7y ago
I know of the techempower benchmarks. You'll notice that the go results that end up scoring highly are using "atreugo", a customized low allocation implementation. That's how it gets its speed. Java and C# on the other hand are using fully fledged framework implementations (e.g. Vertx or ASP.NET).
You end up with a highly customized implementation not suited for wide use to get the higher performance benefits (and it still doesn't beat java on benchmarks like single/multiple queries and JSON serialization).
All these benchmarks should be taken with a large grain of salt. The golang compiler doesn't even pass function variables in registers (they're all stack allocated as far as I know), let alone do any of the advanced inlining and optimizations the JVM does.
- Thaxll 7y agoThis is not accurate, if you look at the dependencies of the project: https://github.com/savsgio/atreugo/blob/master/go.mod https://github.com/savsgio/atreugo/blob/master/go.mod it uses well known libs like github.com/valyala/fasthttp.
- apta 7y agoWhich is still a specialized library, and not widely used like golangs standard library. And comes with its own set of disadvantages
- Thaxll 7y agoVertx is not part of the standard library either, saying that Fast HTTP is a spezialized lib is very missleading since it's widely used.
- apta 7y agoThis talk is by the author of fasthttp[1]. Note the caveats that come with it. Also, it is nowhere near as widely used nor established as Vertx. [1] https://docs.google.com/presentation/d/e/2PACX-1vTxoBN41dYFB8aV8c0SDET3B2htsAavXPAwR-CMyfT2LfARR2KjOt8EPIU1zn8ceSuxrL8BmkOqqL_c/pub?start=false&loop=false&delayms=3000&slide=id.p https://docs.google.com/presentation/d/e/2PACX-1vTxoBN41dYFB...