And even once you're sure you're comparing at least apples to oranges (rather than apples to giant squid) you need to account for environmental differences. As was alluded to above, environment can greatly affect timing on multiuser boxen.
If you're comparing benchmark times on your desktop Wintendo box which is running nothing else concurrently against benchmark times from a shared CGI server at your ISP chances are you're not going to get "meaningful" results from the comparison (at least not for meaningful values of "meaningful" :). The box could be oversubscribed and you're getting 75 wall-clock seconds of paging activity on one side; you could have a 10k RPM disk on your desktop while the other box is a 7 year old 5400 RPM SCSI drive that's the 6th device on a busy cable. Maybe the directory the source data resides in is being pulled over NFS from across the country.
So no, it's not impossible to imagine plausible scenarios where the numbers you quote are the result. It is fairly impossible to say why though without more concrete details. But underneath it all there's nothing in perl itself per se that's going to make hashes slower or faster on any one implementation (again, it's how that implementation interacts with its environment that's going to introduce variances).
Update: And just to expand on "meaningful results", if your target box takes 135 seconds then your target box takes 135 seconds; comparing against your desktop number doesn't make the other system run any faster. Doesn't really make much sense to get your desktop system's time down if the implementation you use misbehaves where you really need it to run (say slurping entire files into RAM which works fine until you toss it on the other box that starts to thrash if you load more than ~2M of data in any one process). Look at your algorithm, how your processing the data, and why that's taking as long as it is on your target box and fix that instead.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^2: why filling Hash seems slower on unixes than windows ?
by Fletch
in thread why filling Hash seems slower on unixes than windows ?
by vmpilgrim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |