Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RE: Algorithm Efficiency vs. Specialized Hardware?

by Russ (Deacon)
on Jun 20, 2000 at 11:42 UTC ( [id://18945]=note: print w/replies, xml ) Need Help??


in reply to Algorithm Efficiency vs. Specialized Hardware?

P.S. to the above post: grep should be slower than the other two algorithms. Aighearach's results were predictable, where mine are distinctly opposite...
Update:
Having seen a few posts, I have to "update my version of reality" (as a friend always chides me for doing slowly). The grep sort implementation is running faster on everyone else's machines, too. Algorithm analysis would conclude that since sort is in O(N log N), it should be slower than an O(N) algorithm (Max and Ternary should both be in O(N)). Real-world results don't show this.

What's going on? Somebody help me update my version of reality! :-)

Here is what happens on my system:

Benchmark: timing 1000000 iterations of Grep, Max, Ternary... Grep: 10 wallclock secs (10.75 usr + 0.05 sys = 10.80 CPU) Max: 31 wallclock secs (31.10 usr + 0.05 sys = 31.15 CPU) Ternary: 32 wallclock secs (31.29 usr + 0.01 sys = 31.30 CPU)
It is a dual PPro 200 (180, overclocked), RedHat 5.2 (seriously upgraded - 2.2.12 kernel).
perl -v says:
This is perl, version 5.005_57 built for i686-linux-thread

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://18945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (None)
    As of 2024-04-25 01:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found