Zig NEWS

Discussion on: Cool Zig Patterns - Gotta alloc fast

Collapse
 
silversquirl profile image
Silver

Since you don't need the object and the list node at the same time, you can reduce memory usage and improve cache locality by using a union of std.TailQueue(void).Node and Object, instead of a std.TailQueue(Object).Node which always stores redundant information.

Collapse
 
xq profile image
Felix "xq" Queißner

I know, i've done this in #12586 to provide this functionality to the std lib