Threadwell

Recent Notes

  • DemetriSpanos

    Oct 06, 2026

    • archive
    • twitter
    • demetrispanos
  • NOTimothyLottes

    Oct 06, 2026

    • archive
    • twitter
    • notimothylottes
  • bonzajplc

    Oct 06, 2026

    • archive
    • twitter
    • bonzajplc
Home

❯

Archive

❯

Threads

❯

SebAaltonen

❯

This is how you write a good x64 spinlock: Use two stage construct.

❯

@SebAaltonen Interesting.

@SebAaltonen Interesting.

Properties5
typearchive
sourcetwitter
date2019-05-05
tagsarchive, twitter, sebaaltonen
description@SebAaltonen Interesting.

May 05, 20191 min read

  • archive
  • twitter
  • sebaaltonen

Source

  • URL: https://x.com/ArvidGerstmann/status/1125124392319582214
  • Author: Arvid Gerstmann (@ArvidGerstmann)
  • Posted: 2019-05-05 19:45:33

Branch

1/ @ArvidGerstmann

@SebAaltonen

Interesting. I’ve been using xchg over cmpxchg for ages, but according to the Intel manual, the performance of both is equivalent. This must be related to AMDs architecture.

Related

  • Spine: 2019-05-05-this-is-how-you-write-a-good-x64-spinlock-use-two

Graph View

  • Source
  • Branch
  • Related

Backlinks

  • This is how you write a good x64 spinlock: Use two stage construct.

Created with Quartz v5.0.0 © 2026

  • GitHub