Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!ncar!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Efficient STRing CoMPares? Message-ID: <15486@smoke.brl.mil> Date: 16 Mar 91 22:14:52 GMT References: <1991Mar15.142821@mars.mpr.ca> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 6 In article <1991Mar15.142821@mars.mpr.ca> stone@mars.mpr.ca (Darren Stone) writes: >Does anyone know if there's a better (!?) way to compare >strings than with strcmp()? >I'm looking for any speed advantage I can get! #define StrEq( a, b ) (*(a) == *(b) && strcmp( a, b ) == 0) /* UNSAFE */