Eric Blake wrote:
> According to Bob Friesenhahn on 4/9/2008 11:15 AM:
> | On Wed, 9 Apr 2008, Josh Triplett wrote:
> |>
> |> I tested against 1.5.26.  I'll give 2.2.2 a shot and see what I find.
> |> However, when I looked at 2.2.2, it still seems to have a
> |> multi-thousand-line shell script; do you just expect the benefit to
> |> come from the new shell-specific optimizations?
> |
> | Since shell scripts are not compiled, the size of a shell script has
> | very little to do with its execution time.
> 
> On the other hand, recent improvements in autoconf 2.62 proved that we
> were able to speed up testsuite performance by more than 10% by merely
> refactoring Autotest output to avoid shell parsing of code that would not
> be executed.  In other words, the time the shell spends on parsing its
> input, whether or not that input is executed, is not trivial.
> 

Just for fun, lets compare shells at parsing useless code.

(using bash)
$ for y in {1..100}; do echo "func_notused${y} () {" >> parse.sh; for x
in {1..10000}; do echo foo >> parse.sh; done; echo '}' >> parse.sh;
done; echo 'echo Done' >> parse.sh

On linux:
$ time bash parse.sh
Done

real    0m4.567s
user    0m3.970s
sys     0m0.188s

$ time dash parse.sh
Done

real    0m1.421s
user    0m1.242s
sys     0m0.096s

$ time zsh parse.sh
Done

real    0m1.635s
user    0m1.293s
sys     0m0.161s

On mac os x:
$ time zsh parse.sh
Done

real    0m1.429s
user    0m1.176s
sys     0m0.193s

$ time bash parse.sh
Done

real    0m4.921s
user    0m4.706s
sys     0m0.215s

$ time ksh parse.sh
Done

real    5m31.311s *******
user    5m29.284s
sys     0m1.876s

I know that libtool has not yet reached a million+ lines of useless
shell functions though :)

Peter
-- 
Peter O'Gorman
http://pogma.com


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to