> here, global vars win in speed, as you quoted.
I think you meant "global vars LOSE in speed". Using global dynamic variables you did only 561.35 increments a second, while with the global hash you did 744.83 and with a lexical hash 794.74 increments per second.
If you use timethese() with a negative first argument, the times per se are useless. You have to divide the number of iterations by the times to get anything meaningfull.
Anyway you are right I should have included the global hash in the benchmark as well.
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
In reply to Re: Re: Symbolic refs aka. dynamic variables again
by Jenda
in thread Symbolic refs aka. dynamic variables again
by Jenda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |