4 ms·
Isn't it a terribly inefficient design to malloc hash entries individually? It would make more sense to use a pool / arena for that.
by andreasvc 12y ago
Isn't it a terribly inefficient design to malloc hash entries individually? It would make more sense to use a pool / arena for that.
- mjn 12y agoYou could, but it's fairly uncommon to do that kind of "custom allocator" style in C, especially in traditional Unix utility programming. It seems to be more of a C++ thing culturally in my experience, though you do find it in C in "big" programs, like scientific-computing code.