Comment by do_not_redeem
Comment by do_not_redeem a day ago
I think it's just the Zig philosophy to care more about binary size than speed. Allocators have the same tradeoff, ArrayListUnmanaged is not generic over the allocator, so every allocation uses dynamic dispatch. In practice the overhead of allocating or writing a file will dwarf the overhead of an indirect call. Can't argue with those binary sizes.
(And before anyone mentions it, devirtualization is a myth, sorry)
> (And before anyone mentions it, devirtualization is a myth, sorry)
In Zig it's going to be a language feature, thanks to its single unit compilation model.
https://github.com/ziglang/zig/issues/23367