Hiroshi SHIBATA 2026-10-05 23:32:41 +0000 (Mon, 05 Oct 2026)
New Revision: b732b7d9f2
https://github.com/ruby/ruby/commit/b732b7d9f2
Log:
Avoid locked instructions for atomic loads on x64 Windows
An aligned load is atomic on x64, and seq_cst because stores here use xchg. The fallbacks issued lock xadd or lock cmpxchg on every load, which RUBY_VM_CHECK_INTS and inline cache reads pay for. ARM64EC also defines _M_X64, so it is excluded.
Co-Authored-By: Claude Opus 5.5 <
nor...@anthropic.com>
Modified files:
include/ruby/atomic.h
ruby_atomic.h