Created attachment 423874 [details] [diff] [review] Patch Enclosed patch generates substantially better code for VC2008 (but roughly similar code for gcc 4.x). On Windows this moves the needle substantiall for benchmarks of these two methods (moving from slower-than-FP10 to faster-than-FP10). Basically, cache pattern and preflight the pattern-matching before proceeding.
Comment on attachment 423874 [details] [diff] [review] Patch Looks fine as long as we don't crash when patlen <= 0 by reading pat before we checking the loop condition (j < patlen)
Attachment #423874 - Flags: review?(edwsmith) → review+
patlen<=0 should be filtered out by the caller in all cases, but I'll doublecheck and add assertions to that effect
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.