Erik Engheim
Nov 27, 2021

--

Did you not read the article? I discuss the particular example in the article. I also do that there: https://erik-engheim.medium.com/java-garbage-collector-6f3d3cf3eb0f

Go has no problem outcompeting Java on making binary trees. It is just not allowed to do so in these micro-benchmarks by using secondary allocators.

But Go unlike Java is a systems programming language. A large degree of direct control over system resources is expected. That is what makes it easy to make your own allocators in Go.

With custom allocators you get a lot of freedom to fine tune memory usage in your program.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (1)