Rely on hash to check for some mangled name matches
When we are looking up a function with only a few parameters, we can
optimize the lookup by relying on the information encoded in the hash
value. There's often only one list of parameters with the same
function name and mangled name length that results in a matching hash,
so we don't actually need to compare the full mangled name. We can
just compare
1) the hash value of the mangled name
2) the mangled name length
3) the function name
to make sure that the mangled name matches the mangled name of the
function.
This decreases the binary size since we don't need store as many
mangled names of built-in functions. Effect on symbol lookup speed is
marginal.
BUG=angleproject:2267
BUG=chromium:823856
TEST=angle_unittests
Change-Id: I3ef41d943209509d4e8e6ece14ebad7e2677abc6
Reviewed-on: https://chromium-review.googlesource.com/973242Reviewed-by:
Corentin Wallez <cwallez@chromium.org>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment