Optimizing Collatz in PyPy
Somebody was Wrong on the Internet about the performance of Python, using computing Collatz sequence as a benchmark. Therefore I had to try to measure how long this takes on PyPy, with and without adding a cache for already seen numbers. Takes about 4min on my laptop for 1 billion numbers, or 30s with a cache. Code is here: