Hacker News new | ask | show | jobs
by tptacek 3859 days ago
Nitpick: they're fine in otherwise-reasonable code as long as they aren't shredding the cache. But there are lots of unreasonable designs that waste tons of space, further burning up locality even when the pointers aren't traversed, that are due to pointer overuse.
1 comments

Yes, definitely true; sizeof(void *) and malloc slop aren't free.
sizeof( void* ) is free at run-time.

if not then the compiler team should rethink their careers...

I think the parent is saying that pointers need storage too and this can add up, not that sizeof expressions are computationally difficult :)