Performance significantly worse than dash
- Dominant language
- C
- Stars
- 531
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
I don't know if this is a real issue or just because the project isn't really mature yet, but because afaik there is no irc server where I could talk about this, I wanted to create this issue:
When comparing the run times of this test code in mrsh and in dash:
```sh
#!/bin/sh
echo "Test starting..."
if test -e "123"; then
echo hi
else
echo hello
fi
head -c 50 /dev/urandom
printf "\n"
cat << EOF
123
456
789
EOF
i=0
while [ $i -le 100 ]; do
printf "%s hello world\n" $i
i=$((i+1))
done
```
I get those time results:
dash: `dash test.sh 0.00s user 0.01s system 95% cpu 0.007 total`
mrsh: `mrsh test.sh 0.15s user 0.06s system 102% cpu 0.205 total`
That's a very significant amount of `~30 times` the amount that dash takes to run the script, and when running it a few times, I got similar results. You can even humanly feel the script in mrsh to take some time while in dash, it basically completes instantly.
Contributor guide
Assessment
This issue has not been assessed yet.