Hi,
I did a test with
static inline const guint8*
guint8_pbrk(const guint8* haystack, size_t haystacklen _U_, const guint8 *needles, guchar *found_needle)
{
const guint8 *result = (const guint8 *)strpbrk(haystack, needles);
if (result && found_needle)
*found_needle = *result;
return result;
}
Which seems to give as good results on Ubuntu 13.10, it ends up using __strpbrk_sse42 (libc-2.17.so: strcspn-c.c, ...)
==29458==
==29458== Events : Ir
==29458== Collected : 21130728727
==29458==
==29458== I refs: 21,130,728,727
Load time in WS 0:19.300
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx]
On Behalf Of Anders Broman
Sent: den 2 juni 2014 08:36
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Profileing results with optimized function ws_mempbrk_sse42()
Hi,
I think this looks very good. With filter
22,212,643,979 reduced to 21,418,572,385. Could we use something similar for format_text() and
Address equal functions? Other string functions?
Regards
Anders