Re: Volnitsky substring search algo

From: Date: Wed, 02 Mar 2011 23:20:46 +0000
Subject: Re: Volnitsky substring search algo
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-51550@lists.php.net to get a copy of this message
Stas Malyshev wrote: > Hi! > >> http://volnitsky.com/project/str_search/ > > I'm not sure it'd be easy to integrate this into PHP codebase as-is, > provided it relies on C++ standard libraries which PHP makes no use of > (and thus potentially introduces a world of dependencies and > complexities into the build process). I'm sure it can be re-done in > pure standard C, then it can be tested in PHP and if it's better - I > don't see why it can't be integrated. > Not really. It only uses std::search, which would be equivalent to the current zend_memnstr(). And std::numeric_limits can be replaced with a limits.h macro. I'd be more concerned about the "only for little-endian platforms and where access to misaligned W is allowed" remark. php is also available for big endian architectures, but that seems easy. Some architecture supported by php won't probably accept that, so it would also need some configure test to disable it.

« previous php.internals (#51550) next »