DescriptionReorder checks in tcmalloc.
One of our local changes to tcmalloc is logic to reject all
allocations above a certain size. (At least those via malloc and so
on.) The check for that doesn't need to be on the hot path. Most
allocations are small and there is a special case for that already.
If that special case applies then we don't need to check if the
allocation is gigantic.
This is a performance tuning change. It doesn't affect functionality.
To evaluate this change I ran 3 page cyclers: bloat, dhtml, and
morejs. I used ChromeOS on the Samsung 550. I ran 30 trials; a few
randomly failed, but I got close to 30 "before" and "after" results
for each of those 3 tests.
Results in order of p-value were:
Bloat 0.3% faster, p=0.02
DHTML 0.3% faster, p=0.46
MoreJS 0.1% faster, p=0.82
This looks like a useful gain, but it's small, as one would expect.
BTW I'm trusting the compiler to rewrite
(x < (constant0)) && (x < (constant1))
to
(x < (the smaller of the two constants))
I checked the generated code, and it looks good (at least on the
ChromeOS toolchain for Samsung 550).
BUG=111726
TEST=none
R=jar
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189321
Patch Set 1 #Patch Set 2 : Now with correct indentation. #
Total comments: 3
Patch Set 3 : Added an ASSERT. Removed Jim's TODO. #Messages
Total messages: 11 (0 generated)
|