Created
September 11, 2015 10:42
-
-
Save ormaaj/0a8bfe4ab5efbf9df12c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ( for sh in ksh mksh zsh bash; do "$sh" /dev/fd/3; done ) 3<<\EOF | |
${ZSH_VERSION+'false'} || emulate ksh | |
${BASH_VERSION+shopt -s expand_aliases} | |
${KSH_VERSION+\:} alias integer=typeset | |
[[ ${!KSH_VERSION} == .sh.version ]] || alias .= | |
function f { | |
${1+'false'} || integer depth=$1 iter=$2 | |
if ((!depth--)); then | |
integer i=$iter | |
time while ((i--)); do :; done | |
else | |
. f | |
fi | |
} | |
f 600 1000000 | |
EOF | |
real 0m0.23s | |
user 0m0.23s | |
sys 0m0.00s | |
0m3.86s real 0m3.86s user 0m0.00s system | |
real 0m10.780s | |
user 0m10.781s | |
sys 0m0.000s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment