148 points · by lisper · 7y ago · 61 comments
That said, this procedure is a doozy. It reminds me of the Ackermann function but doesn't quite grow as fast (understatement).
http://rosettacode.org/wiki/Man_or_boy_test
"Haskell
Haskell is a pure language, so the impure effects of updating k must be wrapped in the IO or ST monad (...)
On an AMD Opteron 6282 SE (1) using GHC 7.8.2 this program can compute k = 30 in 1064 s and 156.2 GiB. (2)"
"JavaScript
In Chrome we get a "Maximum call stack size exceeded" when a > 13. In Firefox we get "too much recursion" when a > 12." (Note: it should say "k" (the parameter) not "a").
---
1) 16 cores.
2) 156 GB of RAM: "159874 MB total memory in use"
Is this call by name or call by reference? And how would call by value look like in Algol?
Apparently the test has some real foundation. That the proportion of the limbs (and relative size of the head) only allows children to touch the ear at about 5 years old.