New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RectangleKey for hashing float rects. #3348

Merged
merged 1 commit into from Nov 25, 2018

Conversation

Projects
None yet
3 participants
@gw3583
Collaborator

gw3583 commented Nov 24, 2018

The Au <-> f32 conversion is showing up in a lot of talos profiles.

Since layout in both Gecko and Servo already operate on Au, the
values are already quantized, and so it's reasonable to just
directly hash the floats and avoid the conversions.

This patch changes the main rectangles in PrimitiveKey to be
directly hashed. We can incrementally convert other fields in
the PrimitiveKeyKind to also hash the data types directly.

On Talos, this takes the dl_mutate time from ~4780 down to ~4600
which is a decent win.


This change is Reviewable

@gw3583

This comment has been minimized.

Collaborator

gw3583 commented Nov 24, 2018

r? anyone

This is quite a small patch (~50 lines). It just looks big because it includes #3346. It might be easier to wait until that lands before reviewing this.

Attached try run showing the talos improvements and no related test failures:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f233409be3131dd5b06d65d84fac80760ae9350

@nical

nical approved these changes Nov 25, 2018

@gw3583 gw3583 force-pushed the gw3583:rect-key branch from 5f48bd6 to 9d1fdb5 Nov 25, 2018

Add RectangleKey for hashing float rects.
The Au <-> f32 conversion is showing up in a lot of talos profiles.

Since layout in both Gecko and Servo already operate on Au, the
values are already quantized, and so it's reasonable to just
directly hash the floats and avoid the conversions.

This patch changes the main rectangles in PrimitiveKey to be
directly hashed. We can incrementally convert other fields in
the PrimitiveKeyKind to also hash the data types directly.

On Talos, this takes the dl_mutate time from ~4780 down to ~4600
which is a decent win.

@gw3583 gw3583 force-pushed the gw3583:rect-key branch from 9d1fdb5 to 1f81acb Nov 25, 2018

@gw3583

This comment has been minimized.

Collaborator

gw3583 commented Nov 25, 2018

@bors-servo r=nical

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 25, 2018

📌 Commit 1f81acb has been approved by nical

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 25, 2018

⌛️ Testing commit 1f81acb with merge 35027d9...

bors-servo added a commit that referenced this pull request Nov 25, 2018

Auto merge of #3348 - gw3583:rect-key, r=nical
 Add RectangleKey for hashing float rects.

The Au <-> f32 conversion is showing up in a lot of talos profiles.

Since layout in both Gecko and Servo already operate on Au, the
values are already quantized, and so it's reasonable to just
directly hash the floats and avoid the conversions.

This patch changes the main rectangles in PrimitiveKey to be
directly hashed. We can incrementally convert other fields in
the PrimitiveKeyKind to also hash the data types directly.

On Talos, this takes the dl_mutate time from ~4780 down to ~4600
which is a decent win.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/3348)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 25, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: nical
Pushing 35027d9 to master...

@bors-servo bors-servo merged commit 1f81acb into servo:master Nov 25, 2018

3 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 27, 2018

WR Updater Bot
Bug 1510084 - Update webrender to commit 35027d93aded8c0a7887dadc8aef…
…5e393171e802 (WR PR #3348). r=kats

servo/webrender#3348

Differential Revision: https://phabricator.services.mozilla.com/D13028

--HG--
extra : moz-landing-system : lando

mykmelez pushed a commit to mozilla/gecko that referenced this pull request Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment