[Nasm-bugs] [Bug 3392585] warnings.pl generates bad header with perl-5.10.1

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Fri Aug 9 13:44:00 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392585

--- Comment #8 from H. Peter Anvin <hpa at zytor.com> ---
OK, I figured out what is most likely the problem: the construct
scalar(%aliases).


       Prior to Perl 5.25 the value returned was a string consisting of the
number of used buckets and the number of allocated buckets, separated by a
       slash.  This is pretty much useful only to find out whether Perl's
internal hashing algorithm is performing poorly on your data set.  For
       example, you stick 10,000 things in a hash, but evaluating %HASH in
scalar context reveals "1/16", which means only one out of sixteen buckets
       has been touched, and presumably contains all 10,000 of your items. 
This isn't supposed to happen.

       As of Perl 5.25 the return was changed to be the count of keys in the
hash. If you need access to the old behavior you can use
       "Hash::Util::bucket_ratio()" instead.

I'm going to check in a change to use scalar(keys %aliases) instead, which
ought to work.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list