You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import"core:fmt"
fib :: proc( n : u64 ) -> u64 {
if n <= 1 {
return n
}
returnfib( n - 1 ) + fib( n - 2 )
}
main :: proc() {
r := fib(47)
fmt.println( r )
}
https://odin-lang.org/
fib.odin
:Compilation :
./odin build fib.odin -file -o:speed
Test :
time ./fib
Result : 8.5 seconds
( For comparison :
fib.c
compiled usinggcc -O3
is 5.3 seconds on my system )The text was updated successfully, but these errors were encountered: