in reply to Re: Out-Of-Date Optimizations? New Idioms? RAM vs. CPU
in thread Out-Of-Date Optimizations? New Idioms? RAM vs. CPU
I think of it this way:
- When the first PC's came along, you would try to keep as much in memory as possible because disk access was so very slow compared to the CPU. (I once rewrote a Clipper (Dbase3) program that took > 30 minutes in another language in which I could just use RAM, and it went to 15 seconds ;-).
- Lately, CPU's have become much faster. So much faster that RAM (other than the CPU L1 and L2 caches) has become very slow compared to the CPU. So now you should be trying to keep everything in the CPU caches.
- One way to achieve this is to not keep temporary values in memory, but calculate them again and again (as long as it stays in the L1 and L2 cache).
Liz
P.S.: Yes, my background is experimental physics, sometime long ago.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Out-Of-Date Optimizations? New Idioms? RAM vs. CPU
by Abigail-II (Bishop) on Jul 21, 2003 at 08:04 UTC | |
by liz (Monsignor) on Jul 21, 2003 at 08:13 UTC | |
by Anonymous Monk on Jul 21, 2003 at 08:09 UTC | |
by Abigail-II (Bishop) on Jul 21, 2003 at 08:29 UTC | |
by Anonymous Monk on Jul 21, 2003 at 12:14 UTC | |
Re: Re: Re: Out-Of-Date Optimizations? New Idioms? RAM vs. CPU
by tilly (Archbishop) on Jul 21, 2003 at 16:02 UTC | |
by PhilHibbs (Hermit) on Aug 14, 2003 at 13:54 UTC | |
by Aristotle (Chancellor) on Aug 14, 2003 at 19:51 UTC |
In Section
Meditations