On Wed, Dec 17, 2003 at 09:28:48AM -0700, Jim Cromie wrote:
Hi Fergal,
Id like to see a slightly different interface:
is_faster( sub{}, sub{}, "1st is faster");
This would be nice but what value should I use for iterations? I suppose -1
Benchmark defaults to -3. Its hard to argue against keeping (or implicitly using) that default.
aka Magic. a term that Tom Christiansen dredged out of old English, (or is that Middle Earth)ie - with optional arguments, and the ability to test for a float-val.
OTOH - this might be too DWEOM? ish
DWEOM?
see perlopentut or http://www.gregorpurdy.com/gregor/wow/000438.html
I don't fancy the float stuff. I think it's doable but if someoneyoure way too logical :-)
who's not familiar with the module is reading the test script they could
very easily misunderstand it, unless they read the docs very carefully.
or, more like Benchmark::timethese(). this form also allows 3 or moreI think I'll call that is_fastest().
FWIW, I started messing about with the TB <=> Benchmark relationship..
with the notion that a few new Benchmark::* classes could represent the
Benchmark results more portably than the various versions of Benchmark do.
(notably the old ones)
Benchmark itself could do with refactoring, I though about doing it but then decided against it because people would have to upgrade to use it or I'd have to write two versions of T::B.
yeah - thats why I was thinking to slap a few new classes on/into it via TB. A well-marked living-room invasion as it were.
Also, FWIW, I still want some support for throwing to screen via diag()
It dumps the benchmarks to the screen when the test fails. I can stick in a
verbose flag somewhere to make it do that all the time.
that sounds good - what Im hoping for is something like these
for 5.00503: Benchmark: running DD, EzDD, each for at least 3 CPU seconds... DD: 3 3.15 0.01 0 0 2399 none @ 759.18/s (n=2399) EzDD: 3 3 0.01 0 0 2400 none @ 797.34/s (n=2400)
5.6.2 # EzDD 10582/3.23 = 3276.161 # DD 8616/3.17 = 2717.981
5.8.2 # Rate DD EzDD # DD 2011/s -- -14% # EzDD 2335/s 16% --
my t/speed.t does various unholy version contortions, that would hopefully be obsoleted by Test::Benchmark