John H. DuBois III
2005-06-13 22:21:11 UTC
$ time gawk 'BEGIN{j=1; j^=-1; print j}'
1
real 0m9.62s
user 0m9.60s
sys 0m0.01s
$ time gawk 'BEGIN{j=1; j=j^-1; print j}'
1
real 0m0.00s
user 0m0.00s
sys 0m0.00s
Note the large amount of cpu time consumed in the ^= case. These numbers are
from gawk-3.1.4k built with gcc 2.95.3 under SCO OpenServer 5.0.6a on a Xeon
system. Similar results occur with all versions of gawk back through at least
2.15. Similar results also obtained with gawk 3.1.3 and 3.1.4k built with gcc
3.3.5 under Gentoo Linux on a Pentium III.
John
1
real 0m9.62s
user 0m9.60s
sys 0m0.01s
$ time gawk 'BEGIN{j=1; j=j^-1; print j}'
1
real 0m0.00s
user 0m0.00s
sys 0m0.00s
Note the large amount of cpu time consumed in the ^= case. These numbers are
from gawk-3.1.4k built with gcc 2.95.3 under SCO OpenServer 5.0.6a on a Xeon
system. Similar results occur with all versions of gawk back through at least
2.15. Similar results also obtained with gawk 3.1.3 and 3.1.4k built with gcc
3.3.5 under Gentoo Linux on a Pentium III.
John
--
John DuBois ***@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
John DuBois ***@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/