Each table row shows performance measurements for this IronPython program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|
Read the ↓ make, command line, and program output logs to see how this program was run.
Read fibonacci benchmark to see what this program should do.
import sys
def powLF(n):
if n == 1:
return (1, 1)
L, F = powLF(n//2)
L, F = (L**2 + 5*F**2) >> 1, L*F
if n & 1:
return ((L + 5*F) >> 1, (L + F) >> 1)
else:
return (L, F)
def fib(n):
if n & 1:
return powLF(n)[1]
else:
L, F = powLF(n // 2)
return L * F
print fib(int(sys.argv[1]))
Fri, 30 Oct 2020 19:17:35 GMT COMMAND LINE: /usr/bin/mono /opt/ipy/ipy.exe fibonacci.ipy-3.ipy 1000000 PROGRAM FAILED PROGRAM OUTPUT: Cannot open assembly '/opt/ipy/ipy.exe': Adresář nebo soubor neexistuje.