News for hackers. Stuff that matters.
Re:Nuke: A memory arena implementation for Go by jfindley on Tuesday March 05, 2024 @01:30PM (#39607403)
Generics in go, as they're implemented today, sadly have a fair bit of performance overhead. I haven't tried but my assumption would be that go generics are not fast enough to make an effective arena allocator. I'd be thrilled if someone could prove me wrong though!
Re:Nuke: A memory arena implementation for Go by throwaway894345 on Friday March 08, 2024 @02:15PM (#39644996)
The performance overhead is when you're calling a method on the generic type--Go has to lookup the specific implementation in a dictionary. Pretty sure that doesn't apply for straight-up container use cases like this one.