[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strstr speedup
From: |
Eric Blake |
Subject: |
Re: strstr speedup |
Date: |
Sat, 12 Jan 2008 09:04:59 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 1/12/2008 8:55 AM:
|> so we can directly use tolower() here without expanding the
|> argument multiple times?
|
| I would not put side effects into the argument of tolower(): Some platforms
| may expand it into a macro which evaluates the argument more than once.
And such platforms are also broken, again arguing for a ctype and/or
tolower module. POSIX includes a general rule that macro replacements for
functions must evaluate their argument only once, unless the function
explicitly states otherwise.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHiOUq84KuGfSFAYARAvEGAJ4yGZBYA67lbqKpuO4SeRPSa3vnZQCffrl0
LmdOImPxv2ekaiQ2TOzX8YE=
=/Avn
-----END PGP SIGNATURE-----
- Re: strstr speedup, (continued)
Re: strstr speedup, Bruno Haible, 2008/01/11