Comment # 35
on bug 10798
from Hadriel Kaplan
The irony of all this is that using the SSE4.2 instructions isn't significantly
faster than just doing it the slow way. I've been running some tests, and
we're talking about a 1% improvement, on average, for various very large
captures of HTTP traffic. And that 1% is debatable, because running the tests
multiple times varies by more than that. Even on a capture file that takes over
5 minutes to dissect (i.e., millions of HTTP packets), the time to dissect it
varies by more than 1% when run multiple times, without changing anything.
I also tried it by changing the slow way to following more of a regex-style
model of "pre-compiling" the pattern. Right now the _ws_mempbrk() function runs
a while loop every time it's called which sets a char array with the pattern's
characters, and that while-loop can be avoided because we know exactly what the
pattern will be whenever we call this function, at compile time. So I change
the tvb_find_line_end() function, which normally ultimately calls ws_mempbrk()
with \r\n as its pattern, to instead search using a pre-built array of chars.
(tvb_find_line_end() is the only function used by http's dissector that calls
ws_mempbrk()) So using this "pre-compiled" pattern model instead of SSE4.2
instructions, I get a 1% improvement as well, on average. (in fact, it's
slightly *faster* than the SSE4.2 mode)
You are receiving this mail because:
- You are watching all bug changes.