Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Fast algorithm for 2d array queries

by oiskuu (Friar)
on Feb 08, 2014 at 00:48 UTC ( #1073938=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Fast algorithm for 2d array queries
in thread Fast algorithm for 2d array queries

See the referenced thread. I later implemented a partial SSE version as well (merge using SSE, scan not optimized). Result:

Total 301068 elements in 30 vectors timethis for 5: 5 wallclock secs ( 5.31 usr + 0.00 sys = 5.31 CPU) +@ 439.36/s (n=2333)
Update:
Total 200752 elements in 4 vectors timethis for 5: 6 wallclock secs ( 5.28 usr + 0.00 sys = 5.28 CPU) +@ 1326.33/s (n=7003)
Update2: Right you are, BrowserUk, I was considering small n case only.
Total 50063728 elements in 1000 vectors timethis for 5: 6 wallclock secs ( 6.32 usr + 0.00 sys = 6.32 CPU) +@ 0.63/s (n=4)


Comment on Re^3: Fast algorithm for 2d array queries
Select or Download Code
Replies are listed 'Best First'.
Re^4: Fast algorithm for 2d array queries
by BrowserUk (Pope) on Feb 08, 2014 at 00:56 UTC

    IMO, that thread is not applicable to this problem.

    Prove this assertion!


    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.
Re^4: Fast algorithm for 2d array queries
by BrowserUk (Pope) on Feb 08, 2014 at 09:02 UTC

    Let me rephrase my challenge.

    Are you really suggesting that you can merge sort 500 to 1000 sets of 50,000 numbers, then scan the resulting 2.5 to 5 million element array to count the most frequent constituent -- in 2 milliseconds?


    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2015-07-28 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls