zig binarytrees: use ArenaAllocator#417
zig binarytrees: use ArenaAllocator#417Nathan-Franck wants to merge 1 commit intohanabi1224:mainfrom
Conversation
|
arena allocator is forbbiden, happened to me in first version od Odin binarytrees, I have to correct |
But why? |
|
Allocators and arenas are literally what makes languages like Odin and Zig shine in performance. Not being able to use them makes their benchmarks completely useless. In fact, it only spreads misinformation, showing they're slower than they can be. |
It's true. Why would arenas be forbidden but Garbage Collection is fine for Java, and Rust is allowed to use an external crate for compile time reference counting? Makes no sense to me. I use Arena allocators all the time in my zig code now, and it's amazing. It has freed up so much CPU time to do other more important things besides lifecycle tracking, that I'm almost spoiled for compute. If you are reading this, please reconsider letting us use arenas in the benchmarks! It's in the standard library for a reason! |
|
Currently, Li Zhihong in his Zig solution is benchmarking both libc allocator and system calls. This affects users decisions in their programming language choice. For 2 years. |
Literally this. If arena allocator is disallowed, why don't you call garbage collector on every iteration in C#, Java, Kotlin, Go? Why do you keep solutions of C# and Go if it is known that they use arena allocator under the hood? |
Using an arena allocator, as mentioned in #408 - gives me a 3x speed increase