Fastest
Code 2
5.87 ms
170 op/s
Speed
Benchmark | Runtime | Operations | VS | Visual |
---|---|---|---|---|
Code 2 | 5.87 ms | 170 op/s | 1× | |
Code 3 | 31.2 ms | 32.0 op/s | 5× | |
Code 1 | 36.0 ms | 27.7 op/s | 6× |
Memory
Benchmark | Peak Memory | Score | VS | Visual |
---|---|---|---|---|
Code 2 | 1.32 MB | 7.11 | 1× | |
Code 1 | 1.57 MB | 6.25 | 1.19× | |
Code 3 | 3.27 MB | 5.99 | 2.5× |
Output
Code 1
<string>:8: RuntimeWarning: divide by zero encountered in log2 <string>:8: RuntimeWarning: invalid value encountered in cast
Code 2
No output
Code 3
No output