-
Notifications
You must be signed in to change notification settings - Fork 289
Optimize skip_slice by recording serialized length #1836
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
Conversation
@gankro do we want to review / merge this? |
1 similar comment
@gankro do we want to review / merge this? |
Still need to do perf eval, gotten distracted the last few days. |
I tried performance testing this. I couldn't get solid numbers. WebRender seems to have some weird bimodal timing behaviour that makes measuring header. |
@gankro I can try to do some profiling with this tomorrow, if that would be helpful? |
I did some simple profiling on one of our benchmarks, with the following:
This uses Without: ~325 fps. So, at least in this test case, it's a very significant win. It'd be interesting to see if others can reproduce similar results. With this patch, this is what the profile graph looks look: The two areas I've marked with a red dashed line are time spent inside deserialization functions / iterators, so hopefully there's still quite a lot of wins to be found there. There's certainly a couple of other big targets in that profile I can look at performance-wise in the future too. |
Wow that's really surprising since text is one of the slices that shouldn't actually need this optimization (with a Sufficiently Smart Compiler). Seems pretty convincing to me it's a good win. Let's ship it. |
@bors-servo r+ |
📌 Commit 13bfa65 has been approved by |
Optimize skip_slice by recording serialized length For @jrmuizel to test. <!-- 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/1836) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
serde-rs/serde#855 is probably the next place where we're going to get deserialization wins. @gankro will look at it when he gets a chance. |
For @jrmuizel to test.
This change is