Hacker News new | ask | show | jobs
by hsn915 1734 days ago
Carefully written Go vs uncarefully written C? Sure.

Carefully written Go vs carefully written C? I still think C would win by a factor of 10.

Like I said, most slowness comes from memory access and fragmentation. In C you can use strategies like arena allocations. In Go you cannot turn of the GC.

1 comments

If you want to build a custom allocator (use freelists and vectors of types) you can do all of that in Go and C. There's nothing stopping you from writing custom memory allocators in Go.