Rewrite find_bytestr for faster code
commit1a404c57fbbb77a9be9b4c0d54f8a526bbeeb4be
authorPetr Tesarik <petr@tesarici.cz>
Thu, 11 Oct 2012 09:39:16 +0000 (11 11:39 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Thu, 11 Oct 2012 09:39:16 +0000 (11 11:39 +0200)
tree43504126445db94bc72987931e5716c5a6ab997a
parent1aa3c2b6c0f8a332b66e81f831c7f1b92d2db2f1
Rewrite find_bytestr for faster code

One of the things that have always complicated the main search loop
was the effort to keep forward and reverse search in one loop. It
turns out that this prevents a number of useful optimizations, so
now after the algorithm is well tested, let's separate them.

There's not as much code duplication as one would expect, because I
already had to differentiate between forward and backward in many
places...
libhed/file.c