I tried the following test for division.
perl -MTime::HiRes=gettimeofday,tv_interval -e '$istart=1000;$iend=500
+0; $t0=[gettimeofday]; for $x($istart..$iend){for $y($istart..$iend)
+{ $x/$y }}; $t1=[gettimeofday]; print "lasted->".tv_interval($t0,$t1)
+."\n"'
I did the same thing for multiplication.
On a couple of runs for division I got the times:
- 1.032998
- 1.029043
- 1.043523
- 1.059354
- 1.034561
- 1.072301
- 1.10864
- 1.034843
On a couple of runs for multiplication I got the times:
- 1.075402
- 1.093403
- 1.089273
- 1.077661
- 1.074203
- 1.091646
- 1.080421
These numbers are seconds.
I couldn't draw any conclusions from this...
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, details, 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, summary, 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.