Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Evolving a faster filter? (code)

by Ovid (Cardinal)
on Jan 07, 2013 at 11:32 UTC ( #1012016=note: print w/replies, xml ) Need Help??

in reply to Re: Evolving a faster filter? (code)
in thread Evolving a faster filter?

Thanks for the useful ideas. This gives us something good to play with.

Replies are listed 'Best First'.
Re^3: Evolving a faster filter? (code)
by BrowserUk (Pope) on Jan 07, 2013 at 11:44 UTC

    Perhaps you missed the significance of the timings:

    C:\test>1011850 -O=100000 Dict read at C:\test\ line 96. objects loaded at C:\test\ line 106. App created at C:\test\ line 112. Ovid: (optimal ordering) returned 9193 objs in 4.447958 seconds Ovid: (pessimal ordering) returned 9193 objs in 7.236690 seconds RichardK: (optimal ordering) returned 9193 objs in 4.065038 seconds RichardK: (pessimal ordering) returned 9193 objs in 6.219226 seconds BUK: returned 9193 objs in 0.760572 seconds Filters run at C:\test\ line 138.

    Running your OP algorithm against a set of 100 filters each carefully arrange to filter an increasing number of objects and ordered best to worst, and running two tests -- optimal and pessimal -- the difference between then is less that 50%. That is the best you can hope to achieve with your order-the-filters mechanism.

    However, by altering the way the filters operate upon the objects, you can achieve an order of magnitude saving.

    Or perhaps you've just decided how you want to tackle the problem. Regardless...

    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".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2021-10-17 20:11 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.