3 ms·
no need to bring numba into this when functools is right there time python fibo.py 999 999 268638100244853593861467272021429239676166093189869523401231
by frontalier 2y ago
no need to bring numba into this when functools is right there
time python fibo.py 999
999 26863810024485359386146727202142923967616609318986952340123175997617981700247881689338369654483356564191827856161443356312976673642210350324634850410377680367334151172899169723197082763985615764450078474174626
python fibo.py 999 0.04s user 0.03s system 39% cpu 0.180 total
- Ukv 2y agoTrue that memoization makes factorial trivial, but I think that's erring on the side of skipping the computation we're meant to be benchmarking; a pre-computed array may be even faster. Numba's JIT is applicable in a wide range of scenarios, and could be used alongside memoization if needed.
- crustycoder 2y agoExcept of course that's completely missing the point of the benchmark - not that it is a good point, admittedly.
- frontalier 2y ago> not that it is a good point thank you