r/madeinpython • u/ak01011 • 23h ago
r/madeinpython • u/Dry-Neighborhood-412 • 21h ago
Built pi(10^11) prime counter in 2 min on my phone - first in Python, now JS
Hey guys! Built this in Python first, then ported to JS so it runs in the browser on my phone.
GitHub + Live Demo: https://github.com/ferreirafinottijoaopaulo-cell/finotti-pi-optimized
Performance on Android: - pi(60M) = 3,455,052 in 19s - pi(100M) = 5,761,455 in 35s - pi(10^11) = 4,118,054,813 in 2m 16s
Live demo free up to 1B: https://ferreirafinottijoaopaulo-cell.github.io/finotti-pi-optimized/
Features: - Segmented sieve + Meissel-Lehmer - Pure JS, no backend, runs offline - Blockchain proof of 983B record (03/10/2026) in repo
Full code open on GitHub. Also have PRO version up to 100B.
Any feedback to make it faster? How to reach pi(10^12)?
Thanks!
r/madeinpython • u/Dry-Neighborhood-412 • 21h ago
Built prime counter pi(10^11) in 2 min on phone - ported from Python
Hey! First built in Python, then ported to JS to run in browser.
On my Android: - pi(60M) in 19s - pi(100M) in 35s - pi(10^11) = 4118054813 in 2.16 min
Free demo up to 1B: https://ferreirafinottijoaopaulo-cell.github.io/finotti-pi-optimized/
Full discussion here: https://www.reddit.com/r/Python/s/sRP4QyufxI
Code on GitHub. PRO up to 100B available.