[webkit-reviews] review requested: [Bug 94810] Vector::shrinkToFit should use realloc when canCopyWithMemcpy is true : [Attachment 161235] Updated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 08:37:16 PDT 2012


Yong Li <yoli at rim.com> has asked  for review:
Bug 94810: Vector::shrinkToFit should use realloc when canCopyWithMemcpy is
true
https://bugs.webkit.org/show_bug.cgi?id=94810

Attachment 161235: Updated
https://bugs.webkit.org/attachment.cgi?id=161235&action=review

------- Additional Comments from Yong Li <yoli at rim.com>
I changed the number "10x" because it is actually an estimate after deducting
the extra malloc/free in every cycle. Also I made a mistake that it was on
8K->4K shrinking. To be clear, for 2K-1K shrinking, the time it spends given by
the test reduces from 100% to 60-70%, For 8k-4k shrinking, the elapsed time
reduces from 100% to ~55%.. I'm not sure how to calculate this performance
boost percentage. Now I'm using this formula: (<old time cost> - <new time
cost>) / <old time cost>. Then this cannot explain why we see "2x times faster"
in some logs...


More information about the webkit-reviews mailing list