NYCPHP Meetup

NYPHP.org

[nycphp-talk] new hash filter system..

Joel De Gan joel at tagword.com
Tue Apr 27 13:48:40 EDT 2004


On Tue, 2004-04-27 at 11:51, Adam Maccabee Trachtenberg wrote:
> At first glance, your approach seems to use a lot more memory than the
> original. The first version stores everything in a single integer (or
> double), but you're using a giant array of strings.

Bloom filters use a long binary string, an integer could not be used
with a bloom filter method.

> 
> Also, bitwise checks should be much faster than all the string/array
> exploding and imploding your method requires.

I agree with you fully and will look at optimization for this code. I
have not used bitwise a lot and mostly only for network code. You
wouldn't happen to have a url with any examples of using bitwise shifts
with letter/combinations?

> Have you benchmarked your code against the original algorithm to see
> which is faster?

Bloom filters will be faster on generation, should be about the same on
lookup.

> However, like I said, I only skimmed over the code, so I could be
> completely off base, so take everything I say with a grain of salt.

No, thanks a lot, exactly what I was looking for. I need to know where
this can be better.

Thanks :)

> -adam
-- 
joeldg - developer, Intercosmos media group.
http://lucifer.intercosmos.net




More information about the talk mailing list