-
Notifications
You must be signed in to change notification settings - Fork 0
Fastest Factorial
Write a program that computes the factorial of a given integer in the language of your choosing. Fastest implementation wins. I'll time each entry on my machine.
Your program should accept the integer as its sole argument.
For any interested ActionScripters, you can just submit the factorial function--I'll create a test harness and compile it with redtamarin.
It's worth noting that since each call to the program entails potentially loading an environment, this test reflects the quality of the program as a utility, and not the quickness of the function implementation itself.
- Chul (C) -- 3.711580
- Mark (C) -- 3.819705
- Andres (C++) -- 3.826079
- Drew (Haskell) -- 4.567761
- cwh (Ruby) -- 5.198536
- Andres (AS3) -- 16.034052
- Will (AS3) -- 16.701006
- Jason (Erlang) -- 127.315488
- Ferose (Java) -- 190.650340
Chul, Mark, Will and Andres' programs could not correctly evaluate 120! and were therefore disqualified.
- Drew (Haskell) -- 4.472966
- cwh (Ruby) -- 5.144360
- Jason (Erlang) -- 127.184300
- Ferose (Java) -- 191.249031
Jason's program did not correctly evaluate 100,000! and was therefore disqualified.
- Drew (Haskell) -- 3.314
- Ferose (Java) -- 36.249
- cwh (Ruby) -- 46.448