Repository navigation
The host grows its column to a row per thread, so a 10-thread pool drains 80 units, not 16 - #1171
Merged
Merged
Conversation
…ains 80 units, not 16 cube_run grew the host's column only until a unit per thread had tasks: (P + 7) / 8 rows, each 8 drain units. At 10 threads that is 2 rows, 16 units: six workers took two units and four took one, then waited out the turn (hashmap: 780 ms idle of 4.4 s worker time). The column now grows to a row per thread, 8 units each, and a worker that finishes early takes another. Every program under tests/, bench/runtime and demos prints the same on the native lane at the default thread count, 3 and 5 threads (the netcode walkers test depends on its relay, as on main). bench/runtime at 10 threads on an M4, CPU only, median of 5: 1.09x to 1.23x on 14 of 16, kmeans 1.00x, tree-bitonic 0.96x. The GPU lane does not use this path. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
nicolas-abril
added a commit
to costamatheus97/bend
that referenced
this pull request
Oct 1, 2026
…nt rows, the main thread takes rows, and a turn visits only the rows that can hold a task bendlang#1092's five commits, squashed onto main. The emitter cleanups its last commit carried are already on main (bendlang#1235); the column grow keeps bendlang#1171's row per thread, and a column grow still opens every row to the turns. Co-Authored-By: Nicolas Abril <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Lorenzobattistela
added a commit
that referenced
this pull request
Oct 3, 2026
36 commits since 2.0.34: the M1/M2 Metal pipeline crash (#1154), names keyed ns:name so a library's CID(None) means its own None (#1045), less CPU memory from the host's column and a spin's lent variable (#1171, #1269, #1243), equality-proof arrays (#1130), timers firing under a busy loop (#1122), and the CLI and --verdict fixes listed in CHANGELOG.md. Gates on 5e56772 over the bastion: repo 49/49, ping 46/46, test 1540/1540, perf 121/124. CHANGELOG.md and VERSION name 2.0.35. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idle time
hashmapat 10 threads, on the CPU, runs as a single drain turn over 256 top-level tasks.cube_rungrows the host's column only until there is a unit per thread,(P + 7) / 8rows. That is 2 rows at P = 10, and each row is 8 drain units, so the drain has 16 units of 16 tasks each.The allocator and the bank lock take no samples.
The change
The host's column grows to a row per thread, so the drain has 8 units per thread, and a worker that finishes early takes another. The two expressions become one:
comp.ts63,794 → 63,762 ttok.gpu_passdoesn't use this path.Measurements
These are from an Apple M4 laptop (4 performance and 6 efficiency cores), CPU only (
--gpu off), with the builds interleaved.bench/runtimeat 10 threads, the default here, median of 5. Every output matches main.Other thread counts: these come from the same rule measured earlier by patching the emitted C, median of 3.
tree-bitonic0.95x andqueens0.98xTwo others considered:
Tests
tests/,bench/runtimeanddemos, on the native lane at the default thread count,--threads 3and--threads 5. They print the same as main. The exception isdemos/io_rollback_netcode/walkers_test, which answers from whatever relay is running, as it does on main.gates/repo.tspasses, 49 / 49.Not run
🤖 Generated with Claude Code