[avail for test] libtool-devel-20030121-1

Charles Wilson cwilson@ece.gatech.edu
Sat Feb 8 07:58:00 GMT 2003


Okay, using a more 'fair' metric on speed (don't throw a lot of 
'unknowns' at the libid() function; libtool presumably will only present 
things that IT believes are libraries or DLLs for identification. 
Unless the user mis-specifies something.  So, using THIS test routine, 
which only grabs .dll.a, .a, .dll, and .exe files:

time for fn in /usr/bin/*.exe /usr/bin/*.dll /usr/lib/*.a ; do
   echo $fn : `./cygwin_libid $fn`
done

I get the following results:

Current win32_libid():
real    3m25.480s
user    2m0.436s
sys     1m24.073s


best case, tweaked Ralf script:
real    1m59.535s
user    1m11.151s
sys     0m56.012s


best case, paranoid Chuck script:
real    2m13.261s
user    1m12.385s
sys     0m54.422s


That is, if current is a "100%", then Ralf's is a "58%" and my version 
is a "65%".

Here's what the extra 7% execution speed buys you: my version is never 
fooled by merely renaming the file.  It ALWAYS looks at the actual 
content and format of the file itself (or it will follow a symlink and 
look at the contents of the target).

How'd I speed it up, while still being paranoid like the original?  Try 
to spawn as few subsidiary processes as possible.  When possible, use 
sh's case command for simple regex matching, not grep -E.  Reduce one 
long chain of pipes and spawned programs to a single (complicated) sed 
command.  Use 'head' to discard (and not wait for) long extraneous outputs.

Some of these ideas were originally proposed by Ralf, but this version 
is sufficiently "mine" that I have no problem sumitting to the libtool 
folks.

Ralf -- please drop my 'final' script into one of your generated 
libtools and run your tests (what? rebuilding KDE?) on it, and let me 
know what you think.  (Oh, and since (a) 'file' execution speed is 
invariant with target size, and (b) we match *DLL* and *executable* 
separately, if you are linking directly to DLLs -- as I believe Ralf's 
KDE build does -- then my version is almost as fast (<1% difference) as 
Ralf's "check the name of the file only" version)

--Chuck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin_libid_orig
Type: application/x-java-applet
Size: 804 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030208/af8b0621/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin_libid_ralf_tweaked
Type: application/x-java-applet
Size: 639 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030208/af8b0621/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin_libid_chuck_final
Type: application/x-java-applet
Size: 847 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030208/af8b0621/attachment-0002.bin>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list