flutter_ecommerce_app
flutter_ecommerce_app copied to clipboard
Performance compared to z.sh
I've been evaluating z.lua and so far I couldn't replicate 3x performance improvement claim compared to z.sh.
3x times faster than z.sh
~ ➤ time bash -ic 'for i in {1..1000}; do _zlua --add /tmp; done' &>/dev/null
bash -ic 'for i in {1..1000}; do _zlua --add /tmp; done' &> /dev/null 2.73s user 1.38s system 99% cpu 4.129 total
~ ➤ time bash -ic 'for i in {1..1000}; do _z --add /tmp; done' &>/dev/null
bash -ic 'for i in {1..1000}; do _z --add /tmp; done' &> /dev/null 4.64s user 2.74s system 100% cpu 7.311 total
Based on my calculations on two different systems, the performance improvement is "only" 1.7x.
It seems that your benchmark includes subshell processes creation time.
~ ➤ time bash -ic 'for i in {1..1000}; do let x++ ; done; echo $x'
1000
AFAIK there's no sub-shell created. If there was one then x
would be 0
instead of 1000
at the end of the iteration. Anyway the iteration time without _z
or _zlua
is negligible.
0.12s user 0.01s system 100% cpu 0.130 total