|There's more than one way to do things|
Re: Fast Way to find one array in second array (Update: < 35 seconds.)by BrowserUk (Patriarch)
|on Aug 14, 2016 at 07:35 UTC ( #1169739=note: print w/replies, xml )||Need Help??|
Running the inner loop forward ensure earliest short-circuit and cut time to 1/4.
This will work regardless of the data and takes just under
It works by building an index to the items in the subarrays; uses that index to build bitmaps representing the subarrays; the cross compares the bitmaps using bitwise-OR to determine wholly contained subarrays and deletes them.
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". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section Seekers of Perl Wisdom