>>>>> "Walt" == Walt Mankowski <[EMAIL PROTECTED]> writes:
Walt> Is there any difference in 5.6.1 between
Walt> delete $array[$index];
Walt> and
Walt> $array[$index] = undef;
Walt> There doesn't seem to be from the man page. If there's not, it
Walt> doesn't seem to be a particularly useful feature.
Yes, but the difference is small, about the size of one SV, and
undetectable from Perl code (unless you count the introspective stuff
like Devel::Peek).
It's a microoptimization that helps fix things broken by what was
expected to be an optimization with pseudohashes. Turns out that a
pseudohash is only 15% faster, but slows all hashes down by 15%, so
the code for pseudohashes penalizes everyone by 15% and only itself
gets back to a null savings over just using plain ordinary hashes!
So, pseudohashes must die, and we get our 15% back for the 99% of the
programs that didn't use pseudohashes. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!