Chromium Code Reviews
DescriptionPossible fix for a Mac performance regression.
Introduced in
http://src.chromium.org/viewvc/blink/trunk/Source/wtf/Vector.h?revision=157005
We now do the minimal amount of work possible on Vector destruction. We should
now be faster than ever before:
- The most common case is actually a totally unused Vector with no inline
storage. In this case, we can bail and do no other work, if the buffer pointer
is NULL.
- There's no need to set m_size to 0 in the destructor; we've already checked
that it is 0 and if not called resize(0) which will set it to 0.
- In the Vector with inline storage case, we once again check m_size before
calling shrink(), which might not be inline. It is common for m_size to be 0.
This also saves >50KB on a GCC Release build. clang, as usual, is barely
affected on account of its less aggressive inlining.
BUG=283760
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157198
Patch Set 1 #
Messages
Total messages: 4 (0 generated)
|
||||||||||||||||||||||||||||