From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,874f90f0816ffe3b X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Most efficient way to check for null string? Date: 1997/06/20 Message-ID: #1/1 X-Deja-AN: 251465817 References: <5oe038$2d0$1@goanna.cs.rmit.edu.au> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-06-20T00:00:00+00:00 List-Id: Robert Duff said <> It's not quite so simple. The business of optimizing special cases is a never ending task. Obviously all customers will say they want the code as fast as possible, but they have two other requirements: 1) they do not want to pay infinite money 2) they do not want to wait infinite time therefore the desire to optimize as much as possible has to be balanced against other requirements. What you can deduce if a compiler does not optimize the comparison with the null string is that it has not yet been decided that this is a significant enough optimization to be worth while, or more likely that it has never come up, which is a bit different from your conclusion, generalized apparently to all possible similar optimizations ("this sort of thing")