3 ms·
Yes! The regex crate does this and it saves quite a bit of memory.
by burntsushi 3y ago
Yes! The regex crate does this and it saves quite a bit of memory.
- taeric 3y agoIt is the kind of low hanging optimization that I used to think was greatly oversold. And, to be fair, for many programs I would still wager it probably is. If you are chasing a ton of pointers, though, it is definitely worth considering how many more you can hold in memory with smaller sizes. I think I remember a discussion a while back lamenting that we just tacitly accepted wide pointers. If anyone has a link going over that, I'd be delighted to read it again. I'm 90% sure I did not understand it when I first saw it. :D