in reply to Re^3: Our perl/xs/c app is 30% slower with 64bit 5.24.0, than with 32bit 5.8.9. Why?
in thread Our perl/xs/c app is 30% slower with 64bit 5.24.0, than with 32bit 5.8.9. Why?
I believe (perhaps wrongly) that the first is a space for speed tradeoffExcept for edge cases and possible bugs, COW is intended on average to use less memory and less CPU.
The second is an (IMO) unnecessary fix for a non-problemA non-problem that allows you to trivially DoS any web server where input from the client (such as headers or parameters) are fed into a perl hash.
Anyway, perl's hash handling has been getting faster, not slower in recent years. This trivial code (read 0.5M words from a dictionary file and store in a hash):
consumes the following number of CPU Mcycles under various perls:open my $fh, "</usr/share/dict/words" or die; my %h; $h{$_}++ while <$fh>;
5.8.9 1,245 5.18.0 1,143 5.20.0 1,113 5.22.0 1,163 5.24.0 1,089
Dave.
|
|---|