News for hackers. Stuff that matters.
Re:Friendship ended with the garbage collector by jcelerier on Friday August 27, 2021 @01:05PM (#28330305)
I actually tried with up to 256 bytes and got the exact same timings. But sure, that's the absolute possible best case considering glibc thread pool, but it's (allocating and freeing in a loop) still a pretty common case
Re:Friendship ended with the garbage collector by jonv on Friday August 27, 2021 @01:55PM (#28330969)
But when you enter the loop you have no other "objects" in your program allocated at all, so it doesn't have to do a search for a suitably sized block. Near-identical timings for changing the size to 256 is what I would expect.