Brian you are right, but in my case (host, port, protocol) is unique.
[EMAIL PROTECTED] schreef:
> Guyon Morée wrote:
> > i have a big list of tuples like this:
> >
> > [ (host, port, protocol, startime, endtime), .. ] etc
> >
> > now i have another big(ger) list of tuples like this:
> >
> > [(s
Guyon Morée wrote:
> i have a big list of tuples like this:
>
> [ (host, port, protocol, startime, endtime), .. ] etc
>
> now i have another big(ger) list of tuples like this:
>
> [(src_host, src_port, dest_src, dest_port, protocol, time), ... ] etc
>
> now i need to find all the items in the seco
>> I'd say it is as fast as it can get - using hashing for lookups is O
>> (n) in
>
>
> I know you meant O(1) for hash lookups, but just in case anyone is
> confused, I figured I'd correct this.
Ooops. Thanks.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 1, 2006, at 11:13 AM, Diez B. Roggisch wrote:
> Guyon Morée wrote:
>
>> Memory is no problem. It just needs to be as fast as possible, if
>> that's what this is, fine.
>>
>> If not, I'd like to find out what is :)
>
> I'd say it is as fast as it can get - using hashing for lookups is O
>
Guyon Morée wrote:
> Memory is no problem. It just needs to be as fast as possible, if
> that's what this is, fine.
>
> If not, I'd like to find out what is :)
I'd say it is as fast as it can get - using hashing for lookups is O(n) in
most cases, where bisection or other order-based lookups have
Memory is no problem. It just needs to be as fast as possible, if
that's what this is, fine.
If not, I'd like to find out what is :)
thanx,
Guyon Moree
http://gumuz.looze.net
Paul Rubin schreef:
> "Guyon Morée" <[EMAIL PROTECTED]> writes:
> > if (((src_host,src_port, protocol) in dict or (de
"Guyon Morée" <[EMAIL PROTECTED]> writes:
> if (((src_host,src_port, protocol) in dict or (dest_host, dest_port,
> protocol) in dict) and starttime < time < endtime):
> print "we have a winner"
If you have enough memory to do it that way, what's the problem?
--
http://mail.python.org/mailman/li
hi all,
i have a big list of tuples like this:
[ (host, port, protocol, startime, endtime), .. ] etc
now i have another big(ger) list of tuples like this:
[(src_host, src_port, dest_src, dest_port, protocol, time), ... ] etc
now i need to find all the items in the second list where either
src_