4 ms·
I just repeated your test, but got opposite results: $ time /usr/bin/true real 0m0.003s user 0m0.001s sys 0m0.002s $ time /usr/bin/truth
by function_seven 12y ago
I just repeated your test, but got opposite results:
$ time /usr/bin/true
real 0m0.003s
user 0m0.001s
sys 0m0.002s
$ time /usr/bin/truth
real 0m0.001s
user 0m0.000s
sys 0m0.001s
I can't imagine for the life of me how an empty file could perform worse than an actual binary, but there's gotta be a reason.
- cpwright 12y agoIf you're relying on an empty binary, or exit 0; instead of an actual binary you have to execute a shell process to evaluate it. The binary doesn't need to load a shell, it can just do a bit of setup, then make a single exit 0 system call.
- function_seven 12y agoThank you. That makes sense. So basically the empty file is seen by the shell as a "script" that has to be evaluated, so a separate shell process is spun up to handle it? And the difference between my output and the parent's has to do with some difference in our environments?
- logicallee 12y agothis is what happens when we aren't allowed to use p values anymore :) https://www.sciencebasedmedicine.org/psychology-journal-bans-significance-testing/ https://www.sciencebasedmedicine.org/psychology-journal-bans... The default p is p = 0.5, so I have no trouble accepting both your conclusion and your parent's :) seriously though, this is why we use significance testing in real fields, like computer science...
- greggyb 12y agoExactly. I did the most naive thing possible and only once for each version of true/truth. I was just bored/curious.