3 ms·
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, mo
by hsn915 5y 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.
- 37ef_ced3 5y agoIf 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.