Discussion about this post

User's avatar
Fukitol's avatar

I had always wondered why they weren't done this way in the first place. I mean, I get it, every byte counted, but how many really short strings did your program have such that an extra few bytes made or broke your memory budget? And meanwhile every clock cycle also counted, and you're using a lot of them to do things that you have to do a lot, or else you're just allocating an int to store and reuse the length value anyway...

Anyway maybe I was basking in the luxury of multi-megabyte(!) RAM but my very first question was "why doesn't it just store the length".

1 more comment...

No posts

Ready for more?