Article View: comp.arch
Article #333Re: Performance of xchg reg,reg
From: Michael S
Date: Thu, 22 Oct 2026 19:11
Date: Thu, 22 Oct 2026 19:11
23 lines
2574 bytes
2574 bytes
On Thu, 22 Oct 2026 10:54:04 GMT anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote: > Stefan Monnier <monnier@iro.umontreal.ca> writes: > >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? > > Depends on the hardware. If there is some device connected t the > LOCK# signal (e.g., another CPU), and that behaves differently when > the signal is asserted, the code can measure that. > > - anton My undersanding is that in server x86 CPU physical LOCK# signal does not exist for more than decade. Probably much longer in desktop and laptop devices.
Technical Details
Message-ID:
<20261022221132.000070d5@yahoo.com>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> <2026Oct22.125404@mips.complang.tuwien.ac.at>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: Michael S <already5chosen@yahoo.com> Newsgroups: comp.arch Subject: Re: Performance of xchg reg,reg Date: Thu, 22 Oct 2026 22:11:32 +0300 Organization: A noiseless patient Spider Lines: 23 Message-ID: <20261022221132.000070d5@yahoo.com> 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> <2026Oct22.125404@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Thu, 22 Oct 2026 19:11:40 +0000 (UTC) Injection-Info: dont-email.me; logging-data="341438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KL2WSAPUkWhIBVgf66BUWepnKJBja9Vg="; posting-host="801c7a55a16e382ffc1b1c83f376ddc4" Cancel-Lock: sha1:FRR3Y0Nf1W937I/TOXL2u3zpy7U= sha256:jgrff5InToxn0K2xoYIzQf8ytvpwKvXaSDBZ6UiBILY= sha1:8/Vb7aKa5t6WB0xy+3wimaTz8YI= sha256:Bpi/jEW3Yzk/kM+DF97RSz5bpWviXTj5E2/xv1IXWfA= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)