You can always rely on the power of quantum computing:
That's like choosing the Large Hadron Collider to pop your corn, just because it has a long and impressive name. It might get there eventually, but it takes an awful long time.
Below, Quantum::Superpositions::any() takes 15 whole seconds to do what List::MoreUtils::any() does in 0.1 second. (plain ol'grep is quicker still!)
Don't be overly impressed with the spiel, Q::S is just a bunch of (s-l-o-w) loops underneath:
@a=1..1000;
cmpthese -1,{
a=>q[ my$n=0; for my $i (1..1000) { Quantum::Superpositions::any(
+@a ) eq $i and ++$n } ],
b=>q[ my$n=0; for my $i (1..1000) { List::MoreUtils::any{ $i eq $_
+ } @a and ++$n } ],
};;
(warning: too few iterations for a reliable count)
s/iter a b
a 15.4 -- -99%
b 0.103 14834% --
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
|