Good afternoon everyone,
First of all, I would like to thank you for putting so much time and effort into porting these very important tools.
I have noticed that there are massive differences in the execution time of shell scripts.
When I use bash instead of the default shell, execution is factors slower.
While I was researching, I found the following link.
I then simplified the test script a little and took some measurements of running times.
I am attaching my results to this issue here.
I realise that there are more important issues than performance at the moment,
but I'd like to put it in writing anyway.
Thanks and best regards
Mike
The Script
#!/bin/sh
count=1
while [ ${count} -le 500 ]
do
out=`echo "Some test data" | cut -c1`
count=$((count+1))
done
Results
using sh
MIKEG1@prod:~/perftest$ time ./test.sh
real 0m20,118s
user 0m3,791s
sys 0m1,264s
MIKEG1@prod:~/perftest$ time ./test.sh
real 0m14,980s
user 0m3,745s
sys 0m1,248s
MIKEG1@prod:~/perftest$ time ./test.sh
real 0m16,423s
user 0m3,739s
sys 0m1,246s
MIKEG1@prod:~/perftest$ time ./test.sh
real 0m16,667s
user 0m3,726s
sys 0m1,242s
MIKEG1@prod:~/perftest$ time ./test.sh
real 0m16,431s
user 0m3,758s
sys 0m1,253s
using bash v4 (rocket)
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m15,267s
user 0m25,929s
sys 0m8,643s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m15,796s
user 0m25,838s
sys 0m8,613s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m8,562s
user 0m25,833s
sys 0m8,611s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m13,640s
user 0m25,913s
sys 0m8,638s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m8,053s
user 0m25,803s
sys 0m8,601s
using bash v5 (ZOSOpenTools)
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m40,283s
user 0m42,381s
sys 0m14,127s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m39,797s
user 0m42,342s
sys 0m14,114s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m50,684s
user 0m42,598s
sys 0m14,199s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m44,472s
user 0m42,158s
sys 0m14,053s
MIKEG1@prod:~/perftest$ time ./test.sh
real 1m37,375s
user 0m42,034s
sys 0m14,011s