I don't understand why the other languages are slower, but you can make the Nim version faster by using smaller types (same as your other languages) and using an explicit main function: proc fibonacci(n: int32): float32 = if n < 2: result = float32(n) else: result = fibonacci(n-1) + fibonacci(n-2) proc main = echo fibonacci(50) main()
- Re: Nim vs D aedt
- Re: Nim vs D Araq
- Re: Nim vs D def
- Re: Nim vs D Stefan_Salewski
- Re: Nim vs D def
- Re: Nim vs D yglukhov
- Re: Nim vs D Stefan_Salewski
- Re: Nim vs D aedt
- Re: Nim vs D Stefan_Salewski
- Re: Nim vs D gokr
- Re: Nim vs D Jehan
- Re: Nim vs D mratsim
- Re: Nim vs D yglukhov