4 ms·
It sounds like instead of turning off GC, the algorithm was changed to an "automatic" allocation/deallocation scheme that's closer to what you might see with ma
by emeraldd 9y ago
It sounds like instead of turning off GC, the algorithm was changed to an "automatic" allocation/deallocation scheme that's closer to what you might see with manual memory management in a C like world. I wonder if the Go runtime has any optimizations to turn things into stack/static allocations in that scenario.
- tom_mellior 9y agoI'm not a Go expert, but my understanding of the blog was that the algorithm or any other aspect of the code was not changed. Only the garbage collection frequency.
- emeraldd 9y agoMy comment was in reply to the parent's: > If you never garbage collect, the runtime has to repeatedly allocate new memory from the operating system ...
- tom_mellior 9y agoYeah, that was me. I still don't understand what you're saying. Who is changing what algorithm in what component? If you tell the Go runtime not to garbage collect but keep allocating memory, that memory has to come from somewhere. That somewhere is the operating system.