Skip to content

test(fspy-benchmark): add a contended access row - #683

Merged
wan9chi merged 1 commit into
mainfrom
claude/fspy-bench-contended-row
Aug 18, 2026
Merged

test(fspy-benchmark): add a contended access row#683
wan9chi merged 1 commit into
mainfrom
claude/fspy-bench-contended-row

Conversation

@wan9chi

@wan9chi wan9chi commented Aug 18, 2026

Copy link
Copy Markdown
Member

Motivation

The benchmark's thread count was one constant shared by every suite, fixed at two. Two threads represent a normal tracked process, but they barely make writers fight over the IPC channel's counters, and every recorded access costs two atomic read-modify-writes on words every other thread is touching. Changes to how a record is claimed can therefore look free here while costing real time under a parallel build.

The count moves onto the suite, so the existing rows keep their two threads and stay comparable with earlier runs, and a new access-contended row runs the same opens under eight. It halves the iterations over half the opens, so four times the threads cost about the same wall clock.

Split out of #675, where it was used to measure claim-path changes. Replaces #679, which GitHub auto-closed and deleted the branch of when its base briefly absorbed this commit.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +1.21%  [-16.66% .. +25.37%]  overhead   +57.85%
dynamic/access             change  +2.61%  [ -8.75% .. +18.55%]  overhead    +5.54%
dynamic/access-relative    change  +0.10%  [ -6.79% ..  +7.34%]  overhead   +39.61%
dynamic/access-contended   change  +3.48%  [-19.04% .. +17.04%]  overhead   +16.26%
static/launch              change  +4.08%  [-18.08% .. +31.30%]  overhead  +153.07%
static/access              change  +1.89%  [ -7.93% .. +13.34%]  overhead  +940.83%
static/access-relative     change  +0.02%  [ -4.49% ..  +4.64%]  overhead +1317.31%
static/access-contended    change  -0.35%  [ -8.97% ..  +6.53%]  overhead +2349.63%

macos

dynamic/launch             change  -0.03%  [ -4.61% ..  +4.68%]  overhead  +231.74%
dynamic/access             change  -0.70%  [ -5.94% ..  +3.38%]  overhead    +2.89%
dynamic/access-relative    change  +1.10%  [ -7.76% ..  +7.00%]  overhead  +247.56%
dynamic/access-contended   change  +0.74%  [-82.51% .. +653.29%]  overhead    +2.99%

windows

dynamic/launch             change  -0.05%  [ -5.17% ..  +3.82%]  overhead   +29.44%
dynamic/access             change  +0.00%  [ -0.75% ..  +0.75%]  overhead    +1.32%
dynamic/access-relative    change  -0.18%  [ -1.44% ..  +1.47%]  overhead    +1.49%
dynamic/access-contended   change  +0.00%  [ -1.56% ..  +2.15%]  overhead    +1.81%

The thread count was one constant shared by every suite, fixed at two —
enough to represent a normal tracked process, but not enough to make
writers fight over the channel's counters. Each record costs two atomic
read-modify-writes on words every other thread is touching, and two
threads barely provoke that.

The count moves onto the suite, so the existing rows keep their two
threads and their comparability, and a new `access-contended` row runs the
same opens under eight. It halves the iterations over half the opens, so
four times the threads cost about the same wall clock.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wan9chi
wan9chi force-pushed the claude/fspy-bench-contended-row branch from 6339eba to 01e4cee Compare August 18, 2026 02:57
@wan9chi
wan9chi merged commit f9eecdb into main Aug 18, 2026
19 checks passed
@wan9chi
wan9chi deleted the claude/fspy-bench-contended-row branch August 18, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant