in reply to Re: Re: Re: List module providing any,all and none
in thread List module providing any,all and none

There is a significant benefit to the lighter weight module. Here is the benchmark.

use strict; use warnings; use Benchmark qw(cmpthese) ; use Func; use Quantum::Superpositions; my @a = (1..50); my @b = (35 .. 100); cmpthese(-20, { 'Func- Any > Any' => sub { my $test = Func::any(@a) > Func::any(@b); }, 'Q::S- Any > Any' => sub { my $test = Quantum::Superpositions::any(@a) > Quantum::Sup +erpositions::any(@b); }, }); __DATA__ Rate Q::S Func Q::S 10.7/s -- -84% Func 67.5/s 534% --

You can say thats not conclusive because i didn't test all the features etc. You would be 100% correct. That doesn't change the fact that for smaller everyday things, its lighter and faster. Now if i'm not suppose to try to make things faster/easer then why do we have so many ::simple modules? I realy just dislike the don't reinvent the wheel attitude because it implies that because its already been done once no one else can do it different and there is no need for an alternative. Perhaps there is no use for this module and that is fine. I am however not reinventing Quantum::Superposistions, this module will not do everything thing that one does, and it does not do everything this one does.


___________
Eric Hodges

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: List module providing any,all and none
by Anonymous Monk on Apr 15, 2004 at 20:56 UTC
    Then why did you not mention Q::S in your original node? First, reinventing the wheel is not bad ... but the fact is, you are reinventing a way to get any or all... which is exactly what Q::S does, only in a different manner. (And none is not really needed, now is it?) No one said your code stinks, you simply said you are not reinventing a wheel, but you reall are. That's ok. :)

      The ommission of a mention of Q::S is my fault, i had mentioned it in the CB and forgot to here.


      ___________
      Eric Hodges