3 ms·
A JiT compiler doesn’t have constant overhead, most programs have an initialization phase and one or more hot loop. Those hot loops will be machine code soon an
by kaba0 4y ago
A JiT compiler doesn’t have constant overhead, most programs have an initialization phase and one or more hot loop. Those hot loops will be machine code soon and thus in practice there will be zero difference in a warmed up state.
Also, one of the least toy benchmark out of these (binary tree) which basically just stress tests the GC shows Java and C# multiple times faster than Go. And while you may claim that “you can just use value types” with Go, GC will be a significant part of any practical application and Go is absolutely beaten in this category by quite a huge margin.
- igouy 4y agoUntil Go has memory arenas :-) https://uptrace.dev/blog/posts/go-memory-arena.html#memory-arenas https://uptrace.dev/blog/posts/go-memory-arena.html#memory-a...
- kaba0 4y agoThat’s possible in both languages in a way already and won’t be generally used everywhere as it is an optimization into which you have to put extra effort.