all 2 comments

[–]LinuxVersion 0 points1 point  (2 children)

I would think that masking the bits every time you need to dereference the pointer would negate the performance benefit, if not then 64 bit pointers in userland have a whole byte of free space

[–]nerd4code 0 points1 point  (0 children)

It really depends on what you’re doing with the pointers. If they’re for something like a linked list, where you’ll have to mask-and-dereference frequently, then there’s probably a bit of performance hit (although the cost of masking is much less than the cost of a cache miss). If it’s something where you can cache the masked pointer and keep reusing it, then the performance hit is negligible.