

Linux 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 |
![]() |
3.009µs | 2.705µs | 3.246µs |
2 |
![]() |
3.258µs | 2.955µs | 3.557µs |
3 |
![]() |
3.386µs | 3.036µs | 3.697µs |
4 |
![]() |
3.428µs | 3.246µs | 3.657µs |
5 |
![]() |
3.677µs | 3.467µs | 4.048µs |
6 |
![]() |
3.682µs | 3.307µs | 4.067µs |
7 |
![]() |
3.714µs | 3.266µs | 6.633µs |
8 |
![]() |
3.771µs | 3.406µs | 4.268µs |
9 |
![]() |
11.792µs | 11.262µs | 13.044µs |
10 |
![]() |
1,724.264µs | 632.958µs | 26,250.427µs |
11 |
![]() |
3,497.826µs | 128.854µs | 45,363.344µs |
12 |
![]() |
3,681.406µs | 44.215µs | 69,748.266µs |
13 |
![]() |
5,092.145µs | 91.634µs | 80,527.289µs |
14 |
![]() |
8,819.238µs | 45.446µs | 65,135.137µs |
15 |
![]() |
10,098.854µs | 155.856µs | 64,180.081µs |
16 |
![]() |
11,376.231µs | 383.946µs | 63,689.447µs |
17 |
![]() |
15,412.315µs | 543.109µs | 85,864.899µs |