Re: Inner loop and out of cache question
From: Robert Wessel (robertwessel2_at_yahoo.com)
Date: 01/31/04
- Next message: C: "Re: input & output in assembly"
- Previous message: cutejoe: "OS programming help"
- In reply to: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Next in thread: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Reply: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 23:12:17 +0000 (UTC)
Robert Redelmeier <redelm@ev1.net.invalid> wrote in message news:<UPmSb.746$%n1.211752073@newssvr11.news.prodigy.com>...
> PREFETCH always helps, but sometimes only 2-5%. Maximum
> help is 50% time (double speed) when long calcs (fdiv)
> can run concurrent with long memory fetches.
Incorrect on both counts.
Prefetching can certainly hurt if you do it excessively, or in such a
way that other needed data is cast out of the cache to make room for
the prefetched data, or if you consume bandwidth that could be put to
better uses.
Prefetching can more than double performance as it effectively turns
latency demands into bandwidth demands. If you schedule several
prefetches early enough, they may well all complete in less than
n*(single-access-time). Optimally, proper prefetching could do as
well as reducing each memory request from a complete
processor-to-memory-to-processor latency cycle to whatever a single
memory-controller-to-CPU cycle costs. Practical considerations,
including bus protocol limitations, limitations on numbers of
outstanding concurrent memory requests in various places (CPU,
Northbridge, memory), and limitations on how much prefetchable data
you can actually identify in your program tend to knock that limit
down a fair bit.
- Next message: C: "Re: input & output in assembly"
- Previous message: cutejoe: "OS programming help"
- In reply to: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Next in thread: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Reply: Robert Redelmeier: "Re: Inner loop and out of cache question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|