Change CreateSubRun to copy entire array
This patch changes RunInfo::CreateSubRun() to copy the entire array, then modify character_index. LayoutNG uses CreateSubRun heavily, with much longer ShapeResult than the current layout engine, and this function turned out to be hot. perf_tests/layout/word-break-break-all.html gets ~10% faster, ~700ms to ~630ms. Bug: 636993 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: I869d1b90b1afe5cd84ad3b809ce8453f1f8feba4 Reviewed-on: https://chromium-review.googlesource.com/1088527 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#565326}
Showing
Please register or sign in to comment