in reply to undef speedup ?!
First, if you turn on warnings with "use warnings;", you'll find that your declaration of those hashes has an uneven number of elements. You can correct that by changing it from (0..50000) to (1..50000).
Next, if you turn on strictures with "use strict;", and add my (%h_delete, %h_list, %h_undef); at the appropriate place near the top of the script, the benchmark timings all start looking a lot more like the speed of your 'undef' test.
So this appears to be an artifact relevant only when wielding global variables.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: undef speedup ?!
by Abigail-II (Bishop) on Feb 09, 2004 at 11:28 UTC | |
by davido (Cardinal) on Feb 09, 2004 at 16:57 UTC | |
by Abigail-II (Bishop) on Feb 09, 2004 at 17:39 UTC |