comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Most efficient way to check for null string?
Date: 1997/06/23
Date: 1997-06-23T00:00:00+00:00	[thread overview]
Message-ID: <EC8vsI.2nK.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: dewar.866897158@merv


Robert Dewar (dewar@merv.cs.nyu.edu) wrote:

: Robert Duff says

: | Tucker Taft <stt@houdini.camb.inmet.com> wrote:
: | >...If you really want to
: | >shave cycles, the following will likely be the most efficient:
: | >
: | >     if Str'Last < Str'First then ...

: | Bletch.  That's the least readable of all, but Tucker's right that it
: | might be more efficient.  ...

: Tuck's suggestion is an excellent example of what programmers should NOT do.

I guess I forgot the smiley ;-).

Please don't write "if Str'Last < Str'First then ..." in your code,
but of course if you must, name it after me... (insert smiley here).

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




      parent reply	other threads:[~1997-06-23  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-20  0:00 Most efficient way to check for null string? Dale Stanbrough
1997-06-20  0:00 ` Robert A Duff
1997-06-20  0:00   ` Robert Dewar
1997-06-20  0:00 ` Tucker Taft
1997-06-21  0:00   ` Robert A Duff
1997-06-21  0:00     ` Robert Dewar
1997-06-23  0:00       ` Richard Kenner
1997-06-23  0:00       ` Tucker Taft [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox