Avoid copying value in ComputedStyle CoW comparions (compareEqual)
Because of the cast of the RHS, |u|, a copy would be generated, with code and cycle bloat as the result. In some cases this can even have prevented inlining. Particularly nasty examples: bool compareEqual(const Vector<LengthPoint>&, const Vector<LengthPoint>&) [210 bytes] bool compareEqual(const Vector<CSSPropertyID>&, const Vector<CSSPropertyID>&) [274 bytes] bool compareEqual(const Vector<GridTrackSize>&, const Vector<GridTrackSize>&) [182 bytes] bool compareEqual(const HashMap<String, GridArea>&, const HashMap<String, GridArea>&) [308 bytes] bool compareEqual(const TransformOperations&, const TransformOperations&) [441 bytes] bool compareEqual(const LengthBox&, const LengthBox&) [249 bytes] Remove the U->T cast in compareEqual to avoid the copies. Nothing seems to require this coercion (anymore?) This eliminates the above symbols entirely. A total binary size reduction of >30k (x86-64; non-official) also indicates even the simpler cases/types may have benefited. Review-Url: https://chromiumcodereview.appspot.com/2438353002 Cr-Commit-Position: refs/heads/master@{#426990}
Showing
Please register or sign in to comment