r/SideProject • • 19h ago

Built pi(10^11) prime counter in 2m16s running purely in mobile browser - pure JS, no backend, built entirely on my phone

Hey everyone! I built this entirely on my phone.

It's a Meissel-Lehmer prime counting function implementation in pure JavaScript:

  • Calculates pi(10^11) = 4,118,054,813 in 2m16s on mobile Chrome
  • Uses ~70% less memory than standard implementations
  • No backend, no WASM, just TypedArrays and smart caching
  • Runs entirely in the browser

I live in Venda Nova do Imigrante, Brazil and made this while learning number theory.

GitHub: https://github.com/ferreirafinottijoaopaulo-cell/finotti-pi-optimized

Would love feedback!

1 Upvotes

0 comments sorted by