# Python code import sys def fibonacci(n): if (n <= 2): return n return fibonacci(n - 1) + fibonacci(n - 2) sys.exit(fibonacci(35)) # Python Results: # Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.35 # Maximum resident set size (kbytes): 8960 # Exit status: 176 // Zig stage2 comptime export fn _start() noreturn { const y = fibonacci(35); exit(y); } inline fn fibonacci(n: usize) usize { if (n <= 2) return n; return fibonacci(n - 1) + fibonacci(n - 2); } fn exit(code: usize) noreturn { asm volatile ("syscall" : : [number] "{rax}" (231), [arg1] "{rdi}" (code) : "rcx", "r11", "memory" ); unreachable; } // Zig stage2 comptime results: // Elapsed (wall clock) time (h:mm:ss or m:ss): 3:23.94 // Maximum resident set size (kbytes): 19854412 // Exit status: Command terminated by signal 11