From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15849 invoked by alias); 21 Feb 2010 17:12:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27735 Received: (qmail 7581 invoked from network); 21 Feb 2010 17:12:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100221091152.ZM24040@torch.brasslantern.com> Date: Sun, 21 Feb 2010 09:11:52 -0800 In-reply-to: <201002191045.o1JAjlgg014360@news01.csr.com> Comments: In reply to Peter Stephenson "Re: Hugh number of file descriptor checks" (Feb 19, 10:45am) References: <201002190000.27806.joke@seiken.de> <20100219022710.GA71015@redoubt.spodhuis.org> <201002191045.o1JAjlgg014360@news01.csr.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Hugh number of file descriptor checks MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Sorry to be a bit late responding to this, I was traveling ... On Feb 19, 10:45am, Peter Stephenson wrote: } } How about the following? I also tried to tidy up the rellocation of } fdtable a bit. } } /**/ } mod_export long } zopenmax(void) } { } - static long openmax = 0; } + long openmax = 0; } } if (openmax < 1) { Did you really mean to remove "static" there? With that removed, the "if (openmax < 1)" will ALWAYS be true, so there's no point in testing it -- but the intention of having openmax be static was so that once it's determined, we know what it is and never probe it again. That is, on certain platforms I think you've traded startup-time inefficiency for later run-time inefficiency.