Skip to content

Comment on RE2: robust regexp library by Googleparent

Comments

> 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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.