comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: Thoughts and Opinions or something like that
Date: 26 Apr 2001 11:23:51 -0700
Date: 2001-04-26T11:23:51-07:00	[thread overview]
Message-ID: <yecpudzr03s.fsf@king.cts.com> (raw)
In-Reply-To: 9c6evg$em1$1@marduk.litech.org

jmv16@cornell.edu (Jeffrey M. Vinocur) writes:
[...]
> Well, the goal isn't to lessen branch prediction -- the silicon
> is there either way -- but rather to reduce mispredicted
> branches.  The most basic approach, I guess, is assume all
> backwards branches will be taken -- this gets loops.  One
> not-very-complicated approach is to cache whether a branch was
> taken last time through and predict the same.  This approach,
> however, does exactly what you suggest; it gets loop iterations
> 2,3,4,...,n-1 all correct.

Note that if you have multiple threads/processes/coroutines/whatever,
the threads can interfere with each other's cached branch information.

In practice, I suspect this doesn't make much difference.  You could
cache the branch information separately in each thread, but I suspect
this wouldn't be worth the effort.  It might even be harmful if it
prevents one thread from "learning" from the experience of another.

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Cxiuj via bazo apartenas ni.



  parent reply	other threads:[~2001-04-26 18:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24 17:12 Thoughts and Opinions or something like that chris.danx
2001-04-24 21:35 ` Ted Dennison
2001-04-24 23:27   ` chris.danx
2001-04-25  7:40 ` Andrew Cooke
2001-04-25 10:42   ` chris.danx
2001-04-25 17:26     ` Warren W. Gay VE3WWG
2001-04-26 14:22     ` Marcin 'Qrczak' Kowalczyk
     [not found]   ` <3AE69665.63E362CD@info.unicaen.fr>
2001-04-25 10:51     ` chris.danx
2001-04-25 13:51       ` Jerzy Karczmarczuk
2001-04-25 13:52         ` chris.danx
     [not found]     ` <3AE6DAB3.899FF645@andrewcooke.free-online.co.uk>
2001-04-25 14:30       ` chris.danx
     [not found]       ` <3AE7E37B.F384DCDA@info.unicaen.fr>
2001-04-26  9:02         ` Play with virtual machines (Was: Thoughts and Opinions...) chris.danx
     [not found]         ` <3AE81234.267643AC@kfunigraz.ac.at>
2001-04-26 12:57           ` chris.danx
2001-04-27  2:14             ` Larry Elmore
2001-04-27  3:27               ` Goldhammer
2001-05-03 17:00                 ` singlespeeder
2001-05-03 17:03                   ` singlespeeder
2001-04-25  9:06 ` Thoughts and Opinions or something like that Tarjei T. Jensen
2001-04-25 12:12   ` Jeffrey M. Vinocur
2001-04-26  2:12     ` Nicholas James NETHERCOTE
2001-04-26 18:23     ` Keith Thompson [this message]
2001-04-25 12:09 ` Alain Fischer
2001-04-27 18:20 ` brian hiles
2001-04-28  1:27   ` Gregory Toomey
2001-04-28 21:34     ` chris.danx
2001-04-28 21:34   ` chris.danx
2001-04-30  8:31     ` Jon Beniston
2001-05-04  8:49 ` Biep @ http://www.biep.org
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox