Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Okay so in the multiple list case performance would actually be worse because you'd have a double pointer dereference. I was thinking you'd have the list nodes contiguous in memory so the first dereference would always hit cache but that's a bad assumption for a linked list.

Since you shouldn't reach for a linked list as a default data structure modern hardware anyway, I actually do see how this change makes sense for Zig. Neat!



Allocating list nodes in one block of memory is very common in the intrusive case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: