Atelier des rouesLab FR
Register/AT.EX21.03
Controlled experiment · AT.EX21.03

Sharing a fixed-buffer sieve

1/4 Educational or exploratory value AI-assisted literature assessment · one reading

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 results

Assumptions

I compare one traversal to the last request against four independent traversals using the same buffer. I check the values by direct sieve and external counts at each endpoint.

Result

For offsets 61, 62, 63 and 64 I mark 6 windows instead of 24. For 1, 8, 32 and 64 the largest request is the same and I go from 11 to 6. The 128 bytes count only the marking buffer.

Prior work

Walisch · primesieve

Next question

I will compare batching queries arriving in a prescribed order.

Read the argument and prior work · View supporting evidence

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.