Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

“Most code” is debatable, but one of golang’s goals is ”Go compiles quickly to machine code” (https://golang.org/doc/). Because of that, I can see it being slower than C++ on code that benefits a lot from optimization. That makes it not the right choice for code that runs a lot, as this code likely does (I expect this code runs for many CPU-years each day)


I didn't realize how far off Go's performance was from C/CPP, I have a feeling a lot of it is because of the 25+ years of optimization the c/CPP compilers have gotten.


Go has a “stop the world” garbage collector, and some language features also have performance penalty (defer is well known for being slow). Just to say that’s not only a question of time, even if you wait and invest a huge amount of time and money you will see differences in performances because of language design choices.


Go has a concurrent GC not a stop the world GC.


Right, thanks for correcting. That doesn’t change my point though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: