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

The fact that gc is well suited to this application isn't suprising but what I thought was interesting was that subtracting the time to do the deallocation from the C++ benchmark brought it into line with Go. In other words, ignoring mem management, for this application, Go and C++ performed on par.


There is a huge amount of gratuitous reference count updates and double ptr indirection (see for example their string_slice). Those add up quickly.

The rest is a lot of string manipulation. If you are not taking advantage of being able to layout your objects carefully and avoid memory avoiding allocations, I wouldn't expect C++ to have any particular advantage over Go or Java in in this particular scenario.




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

Search: