3 ms·
I can see how you can make that argument, it makes a lot of sense on the surface. However, it has the slight problem of not actually being true. First, access
by mpweiher 8y ago
I can see how you can make that argument, it makes a lot of sense on the surface.
However, it has the slight problem of not actually being true.
First, accessing RAM is (apart from I/O) the most expensive part of your program these days.
"The reality today is very different: computation is essentially free, because it happens “in the cracks” between data fetch and data store; on a clocked processor, there is little difference in energy consumption between performing an arithmetic op- eration and peforming a no-op."
-- Andrew Black, Object-oriented programming: some history, and challenges for the next fifty years
So making your code more RAM intensive is very unlikely to make it faster, and much more likely to make it slower.
Second: yes, there is a relationship between time-saving technologies and RAM use, but it is mostly coincidental, not causal. My NeXT cube ( 16MB RAM, 400MB HD) had a very productive development environment, and earlier Smalltalk systems were arguably more productive, with even less resource use.
We're slowly groping towards fast feedback loops and loosely coupled components (and often times away from, hence the slowness), and sometimes we pick up some goodness almost as if by accident.
They don't need lots of RAM, the Alto had 128KB.
- pron 8y ago> However, it has the slight problem of not actually being true. The slight problem of your explanation showing that you do not actually understand the issue makes this unprovoked snide remark not only unnecessary but also embarrassing. > First, accessing RAM is (apart from I/O) the most expensive part of your program these days. That is absolutely true but has nothing to do with my argument, as the cost of access is not dependent (at least not much, and NUMA aside) on how much RAM you're using (once you exceed cache sizes etc.). A thousand cache misses cost the same whether your heap is 100 MB or 1 TB. In fact, using more RAM can make it easier to access RAM less, and so can make your application significantly faster precisely because access is expensive. For example, suppose a common operation in your program is using the average of a set of numbers (that doesn't change often). Computing that average would require a large number of RAM operations (depending on the size of the set). On the other hand, computing that value once and caching it, would need more RAM but would access it less. Another example: some modern GCs (like ZGC) have worst-case pauses that are independent of the size of the heap, but the rate of collection increases the less memory you have. Therefore, increasing your heap would only reduce the amount of time spent in GC (because it reduces RAM access by increasing RAM usage). > Second: yes, there is a relationship between time-saving technologies and RAM use, but it is mostly coincidental, not causal. It's very hard to learn from old examples because they operated in a very different environment under very different constraints and requirements (also, RAM constraints affected Smalltalk's ability to cache JITted code, and made it less efficient). But in order to make my argument less controversial, let me put it this way: if you can pay for productivity/performance with RAM you're making a good deal.
- rhacker 8y ago> However, it has the slight problem of not actually being true. The slight problem of your explanation showing that you do not actually understand the issue makes this unprovoked snide remark not only unnecessary but also embarrassing. I thought it was a snide remark too. I wish people would stop using flashy statements just to make themselves sound smarter.