delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/12/31/11:33:43

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Fri, 31 Dec 2004 16:32:45 +0100
From: Gisle Vanem <giva AT bgnett DOT no>
Subject: _djstat_flags
To: djgpp <djgpp AT delorie DOT com>
Message-id: <020501c4ef4d$f9b363a0$0600000a@broadpark.no>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-Priority: 3
X-MSMail-priority: Normal
Reply-To: djgpp AT delorie DOT com

In programs that uses stat() heavily, it seems a huge amount of CPU
cycles is wasted in _is_executable(). If I do:
 _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;

the speed increase is tremendous. Since most program use f?stat()
as-is, I which there was a environment variable that would do the same as
above. Does it make sense if crt could do it based on a $DJSTAT_FLAGS ?

BTW, it's a bit clumsy to have the logic backwards. I.e. 
(_djstat_flags & _STAT_INODE) *should* get the inode number.

--gv

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019