Re: String array intersections

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Skeet [C# MVP]

    #1

    Re: String array intersections

    On Apr 17, 1:55 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
    wrote:

    <snip>
    Mind you, depending on your definition of "fast", processing 1 million of
    anything isn't necessarily ever going to actually be fast. :)
    Ooh, I don't know about that. A little test app I wrote using
    HashSet<stringt akes about 100ms on my laptop with N=1000000 and
    M=50000.

    Not the sort of thing you want to be doing *really* regularly (like on
    every web request to a server) but still pretty fast :)

    Jon
  • Peter Duniho

    #2
    Re: String array intersections

    On Thu, 17 Apr 2008 16:04:06 -0700, Jon Skeet [C# MVP] <skeet@pobox.co m>
    wrote:
    >Mind you, depending on your definition of "fast", processing 1 million
    >of
    >anything isn't necessarily ever going to actually be fast. :)
    >
    Ooh, I don't know about that. A little test app I wrote using
    HashSet<stringt akes about 100ms on my laptop with N=1000000 and
    M=50000.
    Like I said, it depends on your definition of "fast". In some scenarios,
    100ms is incredibly slow.

    That's of course ignoring the question as to whether your test was even a
    valid performance measurement. Depending on the hash implementation,
    there could be a significant difference between the best-case (no
    collisions) and worst-case scenarios (many collisions, no strings actually
    in the intersection). But for the sake of this discussion, I'm willing to
    grant you that. :)

    Pete

    Comment

    Working...