Combine SSE and pre-compiled patterns for faster pbrk
authorHadriel Kaplan <hadrielk@yahoo.com>
Fri, 6 Feb 2015 18:52:37 +0000 (13:52 -0500)
committerAnders Broman <a.broman58@gmail.com>
Wed, 11 Feb 2015 09:14:50 +0000 (09:14 +0000)
commita837570d02dca2ad94ff5046b13592d84a12a345
tree0a06b1d9a1c7c1e6bc67f57412f7adc3a2a1db71
parenta618f1c0d63fd290cbdc93272beaf1ca7e838027
Combine SSE and pre-compiled patterns for faster pbrk

This combines the SSE4.2 instructions usage, with pre-compiled
pattern searching usage, for a faster pbrk search method.

Testing against large files of HTTP and SIP, there is about
a 5% performance improvement by using pre-"compiled" patterns
for guint8_pbrk() instead of passing it the search string and
having it build the match array every time.
Similar to regular expressions, "compiling" the pattern match array
in advance only once and using the "compiled" patterns for
the searches is faster than compiling it every time.

Change-Id: Ifcbc14a6c93f32d15663a10d974bacdca5119a8e
Ping-Bug: 10798
Reviewed-on: https://code.wireshark.org/review/6990
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
15 files changed:
debian/libwireshark0.symbols
debian/libwsutil0.symbols
epan/dissectors/packet-cups.c
epan/dissectors/packet-irc.c
epan/dissectors/packet-megaco.c
epan/dissectors/packet-sdp.c
epan/dissectors/packet-sip.c
epan/tvbuff-int.h
epan/tvbuff.c
epan/tvbuff.h
epan/tvbuff_subset.c
frame_tvbuff.c
wsutil/ws_mempbrk.c
wsutil/ws_mempbrk.h
wsutil/ws_mempbrk_sse42.c