Skip to content
Prev 140347 / 398506 Next

Compare two data sets

Easiest way to do it is to try it out and time it.  Here is a case
where I generated two sets of data with 120,000 characters each (just
random numbers converted to character strings) and then asked for the
intersection of them.  Came up with 3 matched in about 0.2 seconds.
That would seem fastest enough, unless you plan to do this operation
tens of thousands of times:
user  system elapsed
   0.22    0.00    0.22
chr [1:3] "0.289942682255059" "0.75132836541161" "0.638638160191476"
Here is the timing if you get 50000 matches and it is about the same:
user  system elapsed
    0.2     0.0     0.2
chr [1:48908] "0.08385" "0.62639" "0.47603" "0.18578" "0.89447"
"0.58435" "0.15297" ...
On Tue, Mar 25, 2008 at 10:28 PM, Suhaila Zainudin
<suhaila.zainudin at gmail.com> wrote: