DISQUS

DISQUS Hello! Phil Dawes' Stuff is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Searching arrays in X86 assembler with a bloom filter pt 3

Started by phildawes · 9 months ago

Continuing on from yesterday evening, I had a bit of time tonight in front of the telly so I implemented the rest of the fast-search functionality in factor using the assembler code from the previous post.
The first step was to create the simple bloom filter for sending to the assember code. To ... Continue reading »

4 comments

  • You can shift by the contents of the CL register, e.g. shl %cl, %eax .
  • Variable shifts have the count in %cl.

    But why bother? bt r,r and bt r,i are only 1 uop on a Core2. Check the instruction timings here: http://www.agner.org/optimize/

    Use mov (%eax,%edi,4), %edi and drop the shl $0x2, %edi.
  • @Asm - thanks for the link, that's a handy resource
  • Slava Pestov wrote:
    > Hi Phil,
    >
    > I couldn't post a comment on your blog for some reason so I'm posting
    > this to the list instead.
    >
    > The seq>hash word you write already exists in the sets vocabulary, its
    > called unique.
    >
    > And (prepare-filter) looks nicer if you use fry:
    >
    > : (prepare-filter) ( filter seq -- )
    > '[ 1048576 mod _ set-bit ] each ;
    >
    > Slava

Add New Comment

Returning? Login