Treffer: Cache-Aware Chunked Computation in Pure Python: Breaking the Billion Barrier

Title:
Cache-Aware Chunked Computation in Pure Python: Breaking the Billion Barrier
Authors:
Publisher Information:
Zenodo
Publication Year:
2025
Collection:
Zenodo
Document Type:
Report report
Language:
unknown
DOI:
10.5281/zenodo.16777864
Rights:
Creative Commons Attribution 4.0 International ; cc-by-4.0 ; https://creativecommons.org/licenses/by/4.0/legalcode ; Copyright (C) 2025 Richard Thomas Pound
Accession Number:
edsbas.5BDA5C58
Database:
BASE

Weitere Informationen

We present a cache-aware chunked computation technique that enables CPython(with NumPy boolean arrays) to execute billion-scale arithmetic scans efficiently. Byprocessing [1, N ] in fixed-size, cache-fitting segments and reusing precomputed primes,the method achieves up to 515 million integers per second on commodity hardware,including 10 billion integers in 28.09 s and 50 billion in 193.53 s. Results match theoreticaldensities (e.g. square-free ≈ 6/π2) and published prime-gap maxima, while keepingmemory essentially constant per chunk. To our knowledge, these are the largestsingle-core CPython arithmetic scans reported for these tasks.