• svillar@igalia.com's avatar
    Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox · a4099805
    svillar@igalia.com authored
    Reviewed by Antti Koivisto.
    From Blink r152960 by <ojan@chromium.org>
    New performance test for layouts in flexboxes.
    * Layout/flexbox-lots-of-data.html: Added.
    Turns out that order is extremelly uncommon so using a Vector is
    much less expensive. This also special-cases the much common case
    of only having order of value 0 by using Vectors with just one
    preallocated member.
    Also added the performance test that shows a ~1% win when using a
    vector instead of the HashSet.
    * rendering/RenderFlexibleBox.cpp:
    * rendering/RenderFlexibleBox.h:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
flexbox-lots-of-data.html 112 KB