(Sigh. I just can help myself, can I? Always with the advice... ;-)
Two suggestions for using Benchmark:
- If you're using long names for each test, pad the names to the same length with extra spaces on the left. Then your results are much easier to read and compare:
Hash Exists Hit: 4 wallclock secs @ 1204819.28/s (n=10000
+00)
Hash Defined Hit: 3 wallclock secs @ 2173913.04/s (n=10000
+00)
Hash Exists Miss: 1 wallclock secs @ 1515151.52/s (n=10000
+00)
Hash Defined Miss: 3 wallclock secs @ 1492537.31/s (n=10000
+00)
Hash Assigned Miss Truth: 6 wallclock secs @ 1515151.52/s (n=10000
+00)
Hash Assigned Hit Equality: 4 wallclock secs @ 1149425.29/s (n=10000
+00)
Hash Assigned Hit Truth: 5 wallclock secs @ 970873.79/s (n=100000
+0)
Hash Assigned Miss Equality: 6 wallclock secs @ 877192.98/s (n=100000
+0)
- Use cmpthese instead of timethese. That adds a handy comparison matrix at the end of your test results (though this suggestion works much better with shorter names):
Rate HDH HAHE HAME HEH HAMT HDM HAHT HEM
HDH 1111111/s -- -0% -4% -21% -24% -28% -30% -39%
HAHE 1111111/s 0% -- -4% -21% -24% -28% -30% -39%
HAME 1162791/s 5% 5% -- -17% -21% -24% -27% -36%
HEH 1408451/s 27% 27% 21% -- -4% -8% -11% -23%
HAMT 1470588/s 32% 32% 26% 4% -- -4% -7% -19%
HDM 1538462/s 38% 38% 32% 9% 5% -- -3% -15%
HAHT 1587302/s 43% 43% 37% 13% 8% 3% -- -13%
HEM 1818182/s 64% 64% 56% 29% 24% 18% 15% --
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|