3 ms·
> but also the overhead of object memory I don’t think objects have the usual overhead when escape analysis says they can be stack-allocated. Regarding Go: E
by kaba0 4y ago
> but also the overhead of object memory
I don’t think objects have the usual overhead when escape analysis says they can be stack-allocated.
Regarding Go:
Except that Go will be slower in most, complex cases.
- karmakaze 4y agoWhat would make 'complex' cases slower in Go? I know channels can be slow but you don't have to use them (though it's *ideomatic*) The benchmarks game shows them about the same[0] by How many times more CPU seconds. [0] https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- kaba0 4y agoComplex programs will likely need objects (not ‘value types’)+, and Go’s GC is nowhere near as performant as Java’s. Benchmarkgame’s binary tree test is the one that is specifically made to stress test the GC and Java beats out every single managed language by a huge margin there. + Even in Rust/c++ one often has to go with dynamic life times like (A)RC, shared pointers, etc.