_primes_sieve.nx
buildroot/runtime/_primes_sieve.nx
about
_primes_sieve.nx -- Sieve of Eratosthenes, NishiLang.
Implements the standard "drag race" benchmark from
PlummersSoftwareLLC/Primes (Dave's Garage / Dave Plummer):
count primes <= 1,000,000.
Per Dave's rules: report number of complete passes in a 5-second
window. We use a NORMAL byte sieve (1 byte per odd number) -- the
"PrimeSieve" base impl Dave compares against. Some entries
optimize with bit-packing + wheel factorization; we keep this
implementation algorithmically simple to match the reference.
We don't have wall-clock in NishiLang, so this version runs a
SINGLE pass; the harness shell script wraps with time/loop logic
to report passes/sec.
dependencies 1 imports · 0 importers
imports: syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const SIEVE_SIZE: i64 = 1000000 |
functions
| 21 | func run_single_pass() -> i64 called by 1: main |
| 70 | func main() -> i64 calls 1: run_single_pass |