Article View: comp.arch
Article #279Re: Performance of xchg reg,reg
From: Chris M. Thomasson
Date: Mon, 19 Oct 2026 21:27
Date: Mon, 19 Oct 2026 21:27
30 lines
2935 bytes
2935 bytes
On 10/19/2026 6:57 AM, Stephen Fuld wrote: > On 10/18/2026 8:43 PM, Stefan Monnier wrote: >> Anton Ertl [2026-10-18 16:57:26] wrote: >>> And actually all the stuff about XCHG with memory operands does not >>> contradict this sentence. It could be understood as meaning that >>> while all the other aspects of locking don't apply to "XCHG reg, reg", >>> the assertion of the LOCK# signal still has to occur, and that's why >>> Intel processors implement a slow XCHG reg, reg. >> >> How could code witness the difference? >> >> I believe AMD can claim that its behavior is consistent with the >> behavior you'd get when asserting the LOCK# signal. >> >> >> === Stefan > > I believe this all started with empirical data from Anton showing > different performance between Intel and AMD processors for XCHG > reg,reg. There was some speculation that Intel asserted the lock > protocol and that was the cause. The discussion then moved to at best > confusing, and perhaps contradictory documentation. But has anyone > addressed the original question? > > Specifically, do Intel processors actually do the lock stuff when it > isn't necessary? If so, is the cause of the difference? If not, what > is the cause? > Bingo! Tango, Locked on.
Technical Details
Message-ID:
<11b6205$2eicj$2@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <2026Oct18.170823@mips.complang.tuwien.ac.at> <20261018184318.00000bee@yahoo.com> <2026Oct18.185726@mips.complang.tuwien.ac.at> <jwv8q3uqrxf.fsf-monnier+comp.arch@gnu.org> <11b57kt$244nj$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.arch Subject: Re: Performance of xchg reg,reg Date: Mon, 19 Oct 2026 14:27:33 -0700 Organization: A noiseless patient Spider Lines: 30 Message-ID: <11b6205$2eicj$2@dont-email.me> References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <1792257076-5857@newsgrouper.org> <11b0bd3$b5b$1@reader2.panix.com> <1792265982-5857@newsgrouper.org> <2026Oct18.170823@mips.complang.tuwien.ac.at> <20261018184318.00000bee@yahoo.com> <2026Oct18.185726@mips.complang.tuwien.ac.at> <jwv8q3uqrxf.fsf-monnier+comp.arch@gnu.org> <11b57kt$244nj$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 19 Oct 2026 21:27:34 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2574739"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DEW4n7cOxxxwcqhrZY4xVl4T3t0t6d44="; posting-host="ce538cd055c4777fbae39a89c4c06c85" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Ak08NVE+NlVcX0LQvcVBwWbCZcM= sha256:aiN33UTXrFDOIU5NjPTxcIp48OAvEPTGCApTTaNSyLc= sha1:aoSkBz765kC+YzFDMd87kKOVWIo= sha256:9DYtpFR2zidjtuARsjemAliwkuzJVFU1uupXDhNUXZs= In-Reply-To: <11b57kt$244nj$1@dont-email.me> Content-Language: en-US