Re: zend_hash_add_or_update flaw
| From: | Sascha Schumann | Date: | Wed, 06 Dec 2000 21:17:01 +0000 |
| Subject: | Re: zend_hash_add_or_update flaw | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40256@lists.php.net to get a copy of this message | ||
> The second we put nDataSize as the third parameter we can say bye bye to
> any compiler optimization. This is of course, if we actually know (and I
> don't) if some compilers would optimize this.
Apparently, GCC does that:
$ gcc -O -c y.c z.c
$ nm y.o
00000000 t gcc2_compiled.
00000000 T main
$ nm z.o
00000000 t gcc2_compiled.
00000000 T main
U memcpy
y.c uses a constant, z.c a variable as third parameter to
memcpy.
- Sascha