Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.ecp.fr!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: @ and optimization Date: Sat, 26 Apr 2014 20:33:58 -0400 Organization: Aioe.org NNTP Server Lines: 30 Message-ID: References: <27ilk9dvau3o08tmi9ccedohs8j8oujac2@4ax.com> <2014Apr23.150747@mips.complang.tuwien.ac.at> <2014Apr24.191024@mips.complang.tuwien.ac.at> <2014Apr25.104047@mips.complang.tuwien.ac.at> <2014Apr25.172651@mips.complang.tuwien.ac.at> <2014Apr25.192230@mips.complang.tuwien.ac.at> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:29892 On Sat, 26 Apr 2014 17:52:43 -0400, Alex McDonald wrote: > on 26/04/2014 13:50:35, "Rod Pemberton" wrote: >> On Fri, 25 Apr 2014 13:22:30 -0400, Anton Ertl >> wrote: >>> Andrew Haley writes: >>>> and b) even if they don't the hardware may >>>> replace two fetches from the same address with a single one. And this >>>> is not "weird" hardware, but almost every modern (32 bits and up) >>>> design. Even the venerable x86 needs a StoreLoad barrier if you want >>>> sequential consistency. >>> >>> Memory ordering/sequential consistency has nothing to do with this, as >>> established above. And sure, if you have two loads from the same >>> addresses in cached memory, the second one will be served from the >>> cache. But devices that have a side effect on reading are not in >>> cached memory, and two loads will result in two accesses (and two >>> times the side effect). >> >> Coherency means what is in the cache matches what is in memory. > > Coherency says nothing about what value is in memory. Coherency ensures > that the value of an item retrieved from non-disjoint locations by a > coupled processor is the most up-to-date value. > http://en.wikipedia.org/wiki/Cache_coherency RP