-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Expanding Type Traits to make Vector use mem ops more. (pat…
…chset #4 id:120001 of https://codereview.chromium.org/581683002/) Reason for revert: Broke developer builds on os x: https://code.google.com/p/chromium/issues/detail?id=416715 Original issue's description: > Expanding Type Traits to make Vector use mem ops more. > > Vector has several code paths depending on whether the encapsulated > object can be handled with memmove/memcpu/memset or not, and those > are used by many objects. Unfortunately that requires manual hinting > in each class because the type traits used are not strong enough. > > By using type trait functions available in all modern compilers it's > possible to more intelligently select the most optimal code path. > > Preferably the code would use the new type traits in C++ 11 but > unfortunately that requires a modern c++ library. Luckily, those > libraries are mostly just thin wrappers on top of de facto-standard > compiler extension functions anyway. > > With clang this cuts away 105 KB of machine code in blink. Mostly by > no longer needing copy constructor and assignment operators in many > classes so those can be stripped from the binary. > > With gcc the changes are differently. The binary is smaller but only > by 5 KB. It's clear that many Vector methods have become more compact but > it seems gcc compensated by spending that space elsewhere (more inlining?). > > I don't have as good measurement tools for Visual Studio but there was no > huge difference in footprint. > > Performance, all this is from a noisy development computer with a > non-stable cpu clock frequency (turbo ftl...): > > In LayoutTests most changes are within noise levels. But it looks like > large tables and flexboxes might be 1-5% faster. In ParserTests > html5-full-render (macro-benchmark) became 2-3% faster. > > clang footprint numbers: > Total change: -109940 bytes > =========================== > 14 added, totalling +3397 bytes across 8 sources > 19 removed, totalling -13302 bytes across 6 sources > 8 grown, for a net change of +578 bytes (2268 bytes before, 2846 bytes after) across 6 sources > 230 shrunk, for a net change of -100613 bytes (190909 bytes before, 90296 bytes after) across 49 sources > > Biggest changes: > -84410 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/wtf/Vector.h - (gained 784, lost 85194) > -6934 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/wtf/Deque.h - (gained 0, lost 6934) > -2267 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimationData.cpp - (gained 904, lost 3171) > ... > +245 - Source: /home/bratell/src/chromium/src/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp - (gained 245, lost 0) > > BUG= > [email protected] > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182427 [email protected],[email protected],[email protected] NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/594763002 git-svn-id: svn://svn.chromium.org/blink/trunk@182459 bbb929c8-8fbe-4397-9dbb-9b2b20218538
- Loading branch information
Showing
3 changed files
with
13 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters