Skip to content

Run the threaded pencil chunks with Polyester's @batch - #2

Open
pankgeorg wants to merge 1 commit into
integration/allfrom
exp/polyester-batch
Open

Run the threaded pencil chunks with Polyester's @batch#2
pankgeorg wants to merge 1 commit into
integration/allfrom
exp/polyester-batch

Conversation

@pankgeorg

@pankgeorg pankgeorg commented Aug 30, 2026

Copy link
Copy Markdown
Member

One @batch chunk per worker instead of one Threads.@spawn task per chunk in _foreach_pencil (src/plan.jl); output bit-identical, new dependency Polyester.
compare3 vs integration/all @ 901692b, aarch64 Neoverse-N1, 117 N-d/batched cases per thread count: 1 thread 0.99×, 4 threads 1.05×, 16 threads 1.16× geomean (0.95–1.91), no case slower by >5 % — e.g. batched 4096×64 400→216 µs, 1024×64 81→43 µs, 64³ 1.10→0.83 ms, 128³ 11.7→7.9 ms; DRAM-bound 64×65536 at parity. x86-64 (Core Ultra 7 165H, 6P+8E, benchmark/x86-64/compare3/polyester/ on bench/x86-compare3): 32K–256K-element band 1.32× at 4 threads, 1.79× at 8, 2.32× at 12@spawn saturates at 8 threads (4.5×), @batch keeps scaling (6.9× at 12); <32K and DRAM-bound bands at parity, checksums identical. Tables: benchmark/compare3/aarch64/polyester/COMPARE3.md on bench/compare3.
Tested: full suite green on 4 threads.

…er's @Batch

One chunk per worker on Polyester's static thread pool instead of one
Threads.@Spawn task per chunk; results are unchanged.
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