Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Issue 164983007: Refactor CollectionIndexCache for clarity and performance (Closed)

Created:
6 years, 10 months ago by Inactive
Modified:
6 years, 10 months ago
Reviewers:
esprehn, adamk, eseidel
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refactor CollectionIndexCache for clarity and performance Refactor CollectionIndexCache for clarity and performance: - Split nodeBeforeOrAfterCachedNode() method into nodeBeforeCachedNode() nodeAfterCachedNode(). - Simplify and inline isLastNodeCloserThanLastOrCachedNode() / isFirstNodeCloserThanCachedNode() code. - Simplify a lot the branching in nodeAt(). - In nodeAt(), handle the case where the cache is valid first as it is more common and handle all cases where the cache is valid together (i.e index == cachedIndex, index < cachedIndex, index > cachedIndex). - Comment the code for clarity. The Bindings/node-list-access.html is 2-3% faster with this patch. This CL is based on the following WebKit revision by <antti@apple.com>;: http://trac.webkit.org/changeset/158698 R=esprehn, adamk Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167230

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -59 lines) Patch
M Source/core/html/CollectionIndexCache.h View 1 3 chunks +62 lines, -59 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Inactive
6 years, 10 months ago (2014-02-14 23:03:46 UTC) #1
eseidel
lgtm
6 years, 10 months ago (2014-02-15 00:21:32 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/164983007/70001
6 years, 10 months ago (2014-02-15 00:21:41 UTC) #3
commit-bot: I haz the power
6 years, 10 months ago (2014-02-15 00:58:22 UTC) #4
Message was sent while issue was closed.
Change committed as 167230

Powered by Google App Engine
This is Rietveld 408576698