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

Issue 1814103002: CC Animation: Use unordered_map instead of vector. (Closed)

Created:
4 years, 9 months ago by loyso (OOO)
Modified:
4 years, 9 months ago
Reviewers:
Ian Vollick, danakj, ajuma
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CC Animation: Use unordered_map instead of vector. A performance optimization to align the implementation with AnimationTimeline::id_to_player_map_ BUG=595584 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/79f47b36532d07544d99c07ad06c8a45e3e62f92 Cr-Commit-Position: refs/heads/master@{#382241}

Patch Set 1 #

Patch Set 2 : Use move semantics on insertions. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -41 lines) Patch
M cc/animation/animation_host.h View 4 chunks +6 lines, -6 lines 0 comments Download
M cc/animation/animation_host.cc View 1 3 chunks +30 lines, -34 lines 0 comments Download
M cc/animation/animation_timeline.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (7 generated)
loyso (OOO)
4 years, 9 months ago (2016-03-18 00:18:58 UTC) #4
ajuma
lgtml
4 years, 9 months ago (2016-03-18 13:31:17 UTC) #5
ajuma
On 2016/03/18 13:31:17, ajuma wrote: > lgtml lgtm even
4 years, 9 months ago (2016-03-18 13:31:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814103002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814103002/20001
4 years, 9 months ago (2016-03-20 23:52:52 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-21 01:02:02 UTC) #10
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/79f47b36532d07544d99c07ad06c8a45e3e62f92 Cr-Commit-Position: refs/heads/master@{#382241}
4 years, 9 months ago (2016-03-21 01:03:08 UTC) #12
danakj
> A performance optimization to align the implementation with > AnimationTimeline::id_to_player_map_ Why does this performance ...
4 years, 9 months ago (2016-03-21 21:16:15 UTC) #14
loyso (OOO)
On 2016/03/21 21:16:15, danakj wrote: > Why does this performance change include no performance numbers ...
4 years, 9 months ago (2016-03-21 23:41:19 UTC) #15
danakj
On 2016/03/21 23:41:19, loyso wrote: > On 2016/03/21 21:16:15, danakj wrote: > > Why does ...
4 years, 9 months ago (2016-03-21 23:43:48 UTC) #16
loyso (OOO)
On 2016/03/21 23:43:48, danakj wrote: > On 2016/03/21 23:41:19, loyso wrote: > > On 2016/03/21 ...
4 years, 9 months ago (2016-03-21 23:52:47 UTC) #17
loyso (OOO)
p.s. JFYI, I think that crbug/588172 is unrelated to this. And I'm looking for any ...
4 years, 9 months ago (2016-03-21 23:55:03 UTC) #18
danakj
On Mon, Mar 21, 2016 at 4:52 PM, <loyso@chromium.org> wrote: > On 2016/03/21 23:43:48, danakj ...
4 years, 9 months ago (2016-03-22 00:00:32 UTC) #19
loyso (OOO)
On 2016/03/22 00:00:32, danakj wrote: > > > Vector is faster for small numbers, so ...
4 years, 9 months ago (2016-03-22 01:25:46 UTC) #20
danakj
On Mon, Mar 21, 2016 at 6:25 PM, <loyso@chromium.org> wrote: > On 2016/03/22 00:00:32, danakj ...
4 years, 9 months ago (2016-03-22 01:33:38 UTC) #21
loyso (OOO)
On 2016/03/22 01:33:38, danakj wrote: > > My Xenon E5-2680 has enormous 256kb L1 cache. ...
4 years, 9 months ago (2016-03-22 02:11:36 UTC) #22
danakj
4 years, 9 months ago (2016-03-22 18:32:42 UTC) #23
Message was sent while issue was closed.
On Mon, Mar 21, 2016 at 7:11 PM, <loyso@chromium.org> wrote:

> On 2016/03/22 01:33:38, danakj wrote:
> > > My Xenon E5-2680 has enormous 256kb L1 cache. Cache locality helps
> vector
> > > and
> > > bubble-sort-O(n^2)-like algorithms.
> > > I suspect that on typical ARM with 16 kb (leess associative) cache
> these
> > > two
> > > approaches would be on par for n<10.
> > You can run the perf test on an android device. I think you should
> *always*
> > judge your perf measurements on such a device, and not trust your desktop
> > that much anyways. It's pretty simple to run gtest-based perftests on a
> > phone.
> Yup. The only blocker is to get that corp phone :)
>
> > > I think, we shouldn't optimize the case with 4 timelines. It doesn't
> > > matter,
> > > whether we spend 100 or 200 CPU cycles per commit on this.
> > > What matters in this case is realistic numbers like '100+ players' and
> > > overall
> > > complexity of the algorithm.
> > I somewhat agree, but this patch exists as a performance change, so it
> > requires looking at performance. I'm pretty strongly allergic to
> > performance-oriented changes that are not data driven.
> >
> > And without data showing otherwise, I tend to prefer that we default to
> > vector or SmallMap over more-pointer-based structures.
> I understand. By the way, I have another CL with perf change where I get
> rid of
> pointer-heap-alloc-based container:
> crrev.com/1806223002. I also don't introduce any tests there because
> that's a
> win-win change IMO.
> Any suggestions?
>

That's using a less pointery data structure, which looks awesome. Numbers
are good anyway - they're good for your perf and showing your impact, and
they're good practice to make sure you're doing the right thing.

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698