Problems? Is your data what you think it is? | |
PerlMonks |
Re^6: A locale independent sprintf?by swl (Parson) |
on Jul 29, 2020 at 11:58 UTC ( [id://11119959]=note: print w/replies, xml ) | Need Help?? |
The order did switch a little between runs, but that largely ceased once I stopped fiddling about with other processes while the benchmarks were running. I get the same for a locale using a dot as the decimal separator (same WSL system and perl, and also for Strawberry perl 5.28.1). I'll have to try on a native linux machine. I'm not sure why your results are so different. The results I showed use a de_DE locale, so perhaps there is overhead when locale handling is triggered. There are also noise effects with benchmarking, although the numbers are pretty distinct in this case. It could also just be my system. As for use strict and use warnings, I've been bitten before with string based benchmarking when trying to avoid sub overheads. Taking them out makes no difference to the results (see below, although there is one case where y is faster than s). The underlying benchmark code actually calls no strict before it evals code passed as strings. Note the _doeval call in the code generation when a string is passed. Results without strict and warnings:
In Section
Seekers of Perl Wisdom
|
|