Re: which loop is faster

From: EventHelix.com (eventhelix_at_gmail.com)
Date: 01/03/05


Date: 3 Jan 2005 04:11:39 -0800

It will really depend upon "some code".
If "some code" just fits into the cache but the outer loop doesn't:
(2) would be faster.

If the inner and the outer loop fit into the cache, I don't expect to
see
a large difference in performance.

Deepa

--
http://www.EventHelix.com/EventStudio
EventStudio 2.5 - Automate sequence diagram generation


Relevant Pages

  • Re: which loop is faster
    ... >> If the inner and the outer loop fit into the cache, ... If the outer loop doesn't fit within the cache ...
    (comp.lang.c)
  • Re: which loop is faster
    ... Whtz da meaning of outer loop doesn't, ... > If the inner and the outer loop fit into the cache, ...
    (comp.lang.c)
  • Re: Cache-Size vs Performance
    ... to compensate for memory access latency) and there is database cache ... There's no CPU-cache which is sufficient for dbms-execution. ... so dbms-servers mostly become domi- ... data accessed that fits in any cpu-cache. ...
    (comp.arch)
  • Re: [PATCH 1/2] slab: introduce krealloc
    ... On Thu, 22 Feb 2007, Pekka J Enberg wrote: ... The allocator avoids reallocation if the new size ... fits the currently used cache. ...
    (Linux-Kernel)
  • Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs
    ... 2006/7/25, Attilio Rao: ... Intel documentation points out that having a 128-bytes aligned ... syncronizing primitive (which fits in a cache line) will minimize the ...
    (freebsd-arch)