shift read_hex_bytes() and parse_guid_string() into lib/util
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 16 Feb 2018 04:53:15 +0000 (17:53 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 22 Feb 2018 00:04:18 +0000 (01:04 +0100)
commit6ef6ddce5a64c55729c2e3d423757f504b0ab15e
treec4196990dd5fd42ee3db23e05d279d888133f6cb
parent33ef0e57a4f08eae5ea06f482374fbc0a1014de6
shift read_hex_bytes() and parse_guid_string() into lib/util

read_hex_bytes() is going to be used in lib/util/rfc1738.c.

parse_guid_string() is shifted for two reasons: Firstly, it is called
very often in some operations, sometimes constituting a few percent of
the CPU load, and it makes several calls to read_hex_bytes(). We want
the compiler to be able to inline those calls if it thinks that is
wise. Secondly, there are other places that could do with fast GUID
parsing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/util_str_hex.c [new file with mode: 0644]
lib/util/util_str_hex.h [new file with mode: 0644]
lib/util/wscript_build
librpc/ndr/uuid.c
librpc/wscript_build