3 ms·
The RosettaCode versions: http://rosettacode.org/wiki/Man_or_boy_test http://rosettacode.org/wiki/Man_or_boy_test "Haskell Haskell is a pure language, so the
by acqq 7y ago
The RosettaCode versions:
http://rosettacode.org/wiki/Man_or_boy_test 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"
- ufo 7y agoI'm not super familiar with Algol but it seems that this function is not using call-by-value? In most of the translations the parameters to A are functions instead of reals. Is this call by name or call by reference? And how would call by value look like in Algol?