On Sonntag, 21. April 2024 01:01:01 CEST Collin Funk wrote:
> Hi Bruno,
> 
> On 4/20/24 3:50 PM, Bruno Haible wrote:
> > On Linux:                                   On Cygwin 2.9.0:
> > 
> > in create-tests: time ./test-all.sh         in create-tests: time 
> > ./test-all.sh
> >   sh: 1225 sec                                sh: 27406 sec
> >   py: 155 sec                                 py: 2400 sec
> >   => about 8 times faster                   => more than 11 times faster
> 
> What shell did you use for this test?

On Linux: dash.                       On Cygwin: bash

> Would other shells even make a difference?

You just have to replace the first line of gnulib-tool.sh:
  #!/bin/sh -> #!/bin/bash

What I measure (with "GNULIB_TOOL_IMPL=sh time ./test-create-testdir-1.sh") is:
  dash  22 sec
  bash  20 sec

I think that 'dash' is generally somewhat faster than 'bash'. However,
gnulib-tool uses special bash syntax for appending to a list and for the
module caching; this probably makes it faster with 'bash' than with 'dash',

What matters most, in the comparison shell vs. Python, IMO, is the string
processing [1].

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00160.html




Reply via email to