[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    [Mingw-users] exec(ve) arg count (was: Re: MSYS bash: maximum
From:       Tomi Ollila <tomi.ollila () nixu ! com>
Date:       2010-10-27 13:16:42
Message-ID: yf6lj5jydvp.fsf_-_ () taco2 ! nixu ! fi
[Download RAW message or body]

This email got me confused (for a moment) to how long command line can
be launched from perl... but fortunately with 'exec' there is no such limit.

But it is interesting to see the speed of execution when trying  to launch
exec with many arguments from MSYS perl. Try this:

time perl -le '@x = ("x") x 1e5; exec "echo", @x'

on command line.

On MSYS/MSYSGIT (up to 1.0.12 or something) in my test machine this lasts
1 min 40 sec.

On CYGWIN this takes only 2 seconds.

For comparison; on one Ubuntu 9.04 x86_64

env time -p perl -le '@x = ("x") x 1e5; exec "echo", @x'

executed in just 0.06 seconds.

(Hmm, redirecting output to /dev/null improved CYGWIN execution time to
0.4 secs).

(Hmm2: using '1e6' makes perl on MSYS fail (cannot allocate memory for
cygwin heap). On cygwin this executes OK, in 2 secs with >/dev/null
redirection. More interestingly Ubuntu 9.04 x86_64 fails with this, 
but Fedora 13 x86_64 does not).

What I am interested to hear whether the speed of this execution is
improved when using newer msys systems (anyone care to test), and if
not then I/we just need to know it.

Tomi

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic