Marko Kotar (2009) Implementation of regex library on a special purpose hardware. EngD thesis.
We implemented hardware accelerated library, which is partialy compatible with PCRE (Perl Compatible Regular Exression Library). Our library runs on Cavium Octeon CN3680 processor.For execution a special purpose unit for extended discrete finite automata is used. Our implementation is very simplified.Only basic functions and regular expressions of original library are supported. A different way of search was also used. That is why a different result of seach is returned by library, too. It finds the shortest string which corresponds to the regular expresssion. The result is the string which can be a shortened string in the beginning and/or in the end of the string of the reusult returned by the original library.The capturing parens are also not implemented. We described a basic access to the special unit for extended discrete finite automata through Simple Executive Library. It is under GPL licence.It can be used with or without Linux operation system. Due to modularity regular expressions are translated through an inmediate structure to the format of the automata, which are then saved to low latency memory, where they can be accessed by the unit. The search speed of the hardware accelerated library was measured with different regular expressions. The measurements show an interesting speed gain on alternatives as compared to original unaccelerated library.The time complexity of the original library is linear depending on a number of alternatives. But our library has a constant time complexity.
Actions (login required)