News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by xyproto on Wednesday March 30, 2022 @05:21PM (#30860922)
Both. It can be paused or disabled at runtime.
Re:Generics can make your Go code slower by 3a2d29 on Wednesday March 30, 2022 @08:08PM (#30862355)
But then presumably if you disable it you have to have no heap allocation at any time in your program, or manually manage buffers. I feel like that's not worth it.
Re:Generics can make your Go code slower by xyproto on Thursday March 31, 2022 @03:52AM (#30864854)
Sure. But it's not mandatory. And if it's about optimization, pausing the GC for critical regions can be useful, or just pre-allocating memory.