Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: How would you design C's replacement? |
| Date | 2012-05-10 15:37 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <27791253.249.1336689448741.JavaMail.geo-discussion-forums@vbbgl4> (permalink) |
| References | (4 earlier) <slrn3vfsjq75hv.850.ike@iceland.freeshell.org> <17018858.25.1336378275938.JavaMail.geo-discussion-forums@pbcvt9> <jo8b1o$1d1$1@dont-email.me> <310641.766.1336394477650.JavaMail.geo-discussion-forums@vbpz13> <877gwogdh0.fsf@blp.benpfaff.org> |
בתאריך יום שני, 7 במאי 2012 17:31:07 UTC+1, מאת Ben Pfaff: > Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > > > you're entitled to assume that, given two arbitrary pointers to > > nul-terminated sequences of arbitrary length, strcmp() is the > > most efficient way of comparing them. > > I wouldn't assume that. The author of strcmp() might have had > different criteria in mind. For example, he might have optimized > for small code, or for code that can be proved to be correct, or > for code that could be written quickly (if he was in a hurry). > In the olden days you did hear horror stories about memcpy() being a simple byte by byte loop. But compilers have got more sophisticated these days.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: How would you design C's replacement? nick_keighley_nospam@hotmail.com - 2012-05-02 01:22 -0700
Re: How would you design C's replacement? Michael Angelo Ravera <maravera@prodigy.net> - 2012-05-04 00:41 -0700
Re: How would you design C's replacement? Ike Naar <ike@iceland.freeshell.org> - 2012-05-04 08:41 +0000
Re: How would you design C's replacement? Michael Angelo Ravera <maravera@prodigy.net> - 2012-05-07 01:11 -0700
Re: How would you design C's replacement? James Kuyper <jameskuyper@verizon.net> - 2012-05-07 07:18 -0400
Re: How would you design C's replacement? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-05-07 05:41 -0700
Re: How would you design C's replacement? James Kuyper <jameskuyper@verizon.net> - 2012-05-07 09:24 -0400
Re: How would you design C's replacement? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-07 09:31 -0700
Re: How would you design C's replacement? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-05-10 15:37 -0700
Re: How would you design C's replacement? BGB <cr88192@hotmail.com> - 2012-05-04 08:16 -0700
Re: How would you design C's replacement? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-04 09:49 -0700
csiph-web