Hacker News new | ask | show | jobs
by haberman 5944 days ago
> 4. His inner loop looks like it uses way more instructions than are reasonably called for although, to be sure, to be certain of that I'd have to know what requirements he's constrained to satisfy. When running out of the DFA cache, my implementation could (at least when last measured) get by on something like 12 or 20 instructions per character in the string being searched.

With SSE 4.2's text-processing instructions, regex matching could become essentially hardware-accelerated.

http://www.reghardware.co.uk/2008/03/18/intel_sse_4_text_twe...

I'd be really interested to see benchmarks on Nehalem of regexes compiled into the SSE-accelerated text-processing instructions.