On 20 March 2012 01:33, Derek <ddparn...@bigpond.com> wrote: > Is the effort to do this really an issue with today's vast amounts of RAM > (virtual and real) available? How much memory are you expecting to 'save'? > > And is RAM address alignment an issue here also? Currently most literals are > aligned on a 4 or 8-byte boundary but with this sort of pooling, some > literals will not be so aligned any more. That might not be an issue but I'm > just curious.
Gah, I hate this sentiment! It encourages lazy, poor design and practice simply because "RAM/CPU is cheap, dev time is expensive". Yes, RAM and CPU /are/ cheap, and dev time is expensive, but so is losing millions of dollars of revenue because your loading times on your app are 100ms too slow, and your conversion rate drops. This is the one thing that i hate about the Rails community, since it is their motto. Sites should be blazingly fast with today's computing power, but a ridiculous focus on "Developer productivity" has meant that no change has happened. I love it when D threads talk about whether or not the compiler does inlining, or loop unrolling, or whether it does, or should, use the correct instructions for the target. Not because I get off on talking about optimisation, but because it shows that there are still people care about squeezing every last instruction of performance, without compromising on productivity. Resources cost money, any saving of resources saves money. -- James Miller