re::engine::Hyperscan - High-performance regular expression matching library (Intel only)
use re::engine::Hyperscan; if ("Hello, world" =~ /(Hello|Hi), (world)/) { print "Greetings, $1!"; }
ALPHA - Does not work YET
Replaces perl's regex engine in a given lexical scope with Intel's Hyperscan regular expressions provided by libhyperscan.
This provides the fastest regular expression library on Intel-CPU's only, but needs to fall back to the core perl regexp compiler with backtracking, lookbehind, zero-width assertions and more advanced patterns. It is typically 50% faster then the core regex engine.
For the supported syntax see https://01org.github.io/hyperscan/dev-reference/compilation.html.
With the following unsupported constructs in the pattern, the compiler will fall back to the core re engine:
\C
\R
\K
Returns the result from hs_expression_info(). NYI The minimum length in bytes of a match for the pattern.
Returns the result from hs_expression_info(). NYI The maximum length in bytes of a match for the pattern. If the pattern has an unbounded maximum width, this will be set to the maximum value of an unsigned int (UINT_MAX).
Returns the result from hs_expression_info(). NYI Whether this expression can produce matches that are not returned in order, such as those produced by assertions.
Returns the result from hs_expression_info(). NYI Whether this expression can produce matches at end of data (EOD).
Returns the result from hs_expression_info(). NYI Whether this expression can *only* produce matches at end of data (EOD).
Returns a pointer to the internal Hyperscan engine, the database, suitable for the XS API (regexp*)re->engine field.
(regexp*)re->engine
Reini Urban <rurban@cpan.org>
Copyright 2017 Reini Urban.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install re::engine::Hyperscan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm re::engine::Hyperscan
CPAN shell
perl -MCPAN -e shell install re::engine::Hyperscan
For more information on module installation, please visit the detailed CPAN module installation guide.