

Mac Benchmark: 3n + 1 Problem
The Collatz Conjecture, also known as 3n + 1, is a mathematical problem that has puzzled mathematicians for years. The conjecture states that if you take any positive integer n, and if n is even, divide it by 2, and if n is odd, multiply it by 3 and add 1, and repeat this process, you will eventually reach the number 1. This benchmark tests the performance of the 3n + 1 problem on the number “837,799” which takes 524 steps to reach 1.
number
math
algorithm
All-Time Rankings
Rank | Language | Average Time | Best Time | Worst Time |
---|---|---|---|---|
1 |
![]() |
1.883µs | 1.791µs | 2.832µs |
2 |
![]() |
2.640µs | 2.000µs | 3.000µs |
3 |
![]() |
2.851µs | 2.710µs | 3.030µs |
4 |
![]() |
2.920µs | 2.000µs | 4.000µs |
5 |
![]() |
3.200µs | 3.000µs | 4.000µs |
6 |
![]() |
3.249µs | 3.113µs | 3.706µs |
7 |
![]() |
3.342µs | 3.193µs | 3.692µs |
8 |
![]() |
3.440µs | 3.000µs | 4.000µs |
9 |
![]() |
15.567µs | 15.052µs | 16.984µs |
10 |
![]() |
57.560µs | 54.000µs | 69.000µs |
11 |
![]() |
62.282µs | 55.519µs | 111.884µs |
12 |
![]() |
90.738µs | 84.838µs | 128.243µs |
13 |
![]() |
128.160µs | 116.316µs | 230.045µs |
14 |
![]() |
144.800µs | 127.000µs | 292.000µs |
15 |
![]() |
269.958µs | 228.219µs | 467.586µs |
16 |
![]() |
24,620.650µs | 249.384µs | 578,378.670µs |
17 |
![]() |
25,117.519µs | 492.385µs | 581,542.449µs |