Sharing a fixed-buffer sieve
I fix a 128-byte marking buffer and compare shared versus separate passes for three four-query workloads. The supplied counts make the effect of query spacing visible: nearby ranks share more windows, while independently served distant requests repeat work. This is a bounded illustration of segmented sieving, not a new memory-bounded method. It could guide a batch policy, but the result needs reproducible window-cost definitions and runtime measurements before it supports a practical recommendation.
The Segmented Sieve of Eratosthenes and Primes in Arithmetic Progressions to 10¹² — Carter Bays and Richard H. Hudson · Two Compact Incremental Prime Sieves — Jonathan P. Sorenson
How I rate resultsI have four ranks beyond rank 4,000 and a 128-byte marking buffer. Where does sharing save the most?
- Offsets
- [1, 8, 32, 64]
- Primes
- [37831, 37897, 38197, 38569]