Hacker News new | ask | show | jobs
by flohofwoe 2041 days ago
Assuming that Go can easily call into C code you can still implement the performance-critical parts in carefully written and tested C and the other 90% in high-level Go.

On the other hand, if implanting a faster allocator fixes performance problems, then there's something bigger amiss in the overall application design. Creating and destroying small objects at such a high frequency that memory management overhead becomes noticeable isn't a good idea in any case, GC or not.

2 comments

> performance-critical parts in carefully written and tested C

Is something that not even the Linux kernel with its careful and throughout patch review process is not able to achieve.

I believe calling C from Go is a massive pain, and is slow, because of goroutines. Go makes the OS syscalls directly to avoid going through libc.