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)

Replies are listed 'Best First'.
Re^4: Fast algorithm for 2d array queries
by BrowserUk (Patriarch) 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 (Patriarch) 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.