in reply to Reaped: Processor or Memory

As has been mentioned frequency has leveled off. CPU companies (read AMD,Intel, and even ARM to some degree) are using multiple cores to increase performance. However many programs, even though they use multiple threads, are not written to take advantage of the 2,4,6,8 cores seen in modern CPUS.

You asked if it was more important to optimize code for CPU or for memory. Both are important but the greatest gain will come from writing applications that can take advantage of the increasingly parallel architecture that is the future for processors. And of course, compilers,interpreters and virtual machines still need to "catch up".

Replies are listed 'Best First'.
Re^2: Processor or Memory
by Logicus on Jul 19, 2011 at 13:35 UTC
    Apache2 is multi-threaded, AFAIK, when a request is received it spawns off a new thread which the O/S then schedules on any available core.

      Yes. Apache2 is multi-threaded. However that does not mean that it is optimized for multiple-cores. I can't comment on Apache2 but I do know that often there is an overhead to using a different core (because of memory transfers etc.)

      There has been a lot of progress made in the last few years in getting more use out of those multiple cores. An interesting project is I belive that gcc 4.3.2 has support for some of the pragmas with the -fopenmp option.

      Managing resources across cores is a relatively new challenge and will require new ways of programming to conquer.