linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* String comparison for fixed strings
@ 2007-08-15 11:06 KhaOsh
  2007-08-15 13:18 ` Stephen Kratzer
  2007-08-15 18:51 ` Jesse Ruffin
  0 siblings, 2 replies; 11+ messages in thread
From: KhaOsh @ 2007-08-15 11:06 UTC (permalink / raw)
  To: linux-c-programming

Hello everyone,

In terms of speed what the fastest way of doing a strings comparison
on fixed strings? Using one of those strcmp() functions or doing the
following:

(Pseudo code)
"if (s[0] == 0xa && s[1] == 0xb && s[2] == 0xc)" (etc)
or
"if (s[0] == 'A' && s[1] == 'B' && s[2[ == 'C')" (etc)

Thanks for your help.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-17 20:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 11:06 String comparison for fixed strings KhaOsh
2007-08-15 13:18 ` Stephen Kratzer
2007-08-15 14:46   ` Glynn Clements
2007-08-15 17:26     ` Leslie P. Polzer
2007-08-16  1:44       ` Glynn Clements
2007-08-16  7:30         ` Per Jessen
2007-08-16 18:14           ` Glynn Clements
2007-08-17  7:49             ` Per Jessen
2007-08-17 20:22               ` KhaOsh
2007-08-16  1:54     ` Glynn Clements
2007-08-15 18:51 ` Jesse Ruffin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).