Skip to content
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

Ported code to use futures_codec and tokio_util's Compat #78

Merged
merged 2 commits into from
Oct 12, 2020
Merged

Ported code to use futures_codec and tokio_util's Compat #78

merged 2 commits into from
Oct 12, 2020

Conversation

TheButlah
Copy link
Contributor

@TheButlah TheButlah commented Oct 11, 2020

This MR is a smaller change than #77, which avoids any dynamic dispatch or boxing. It is intended to isolate the changes to just that what is necessary to use futures_codec and tokio_util::compat instead of tokio_util::codec.

Don't merge this MR - we need to merge some basic performance benchmarks to master first, and then we can see the performance impact of the codec changes, separately from the dynamic dispatch stuff in #77.

@TheButlah TheButlah changed the title Ported code to use futures_codec and tokio_util's Compat Draft: Ported code to use futures_codec and tokio_util's Compat Oct 11, 2020
@TheButlah TheButlah changed the title Draft: Ported code to use futures_codec and tokio_util's Compat Ported code to use futures_codec and tokio_util's Compat Oct 11, 2020
@TheButlah TheButlah marked this pull request as draft October 11, 2020 16:17
@TheButlah TheButlah marked this pull request as ready for review October 11, 2020 16:18
@TheButlah TheButlah marked this pull request as draft October 11, 2020 18:50
@TheButlah TheButlah marked this pull request as ready for review October 12, 2020 16:15
@TheButlah
Copy link
Contributor Author

TheButlah commented Oct 12, 2020

OK, using criterion's CLI, I ran a benchmark for both master and for this PR. both were run with a warm up time of 120 and a measurement time of 60 seconds. Saving both results and comparing the two, here's what I get:
image

I trust these results, the measurement and warm ups were long enough and my clock speeds stayed the same in both after the warm up period. So it looks like we have a 3.4% performance regression.

Personally I think that's totally fine given the benefits since we can probably optimize stuff later, but what do you think @Alexei-Kornienko?

@Alexei-Kornienko
Copy link
Collaborator

LGTM. I don't see any noticeable regression on my PC

@Alexei-Kornienko Alexei-Kornienko merged commit bb62a64 into zeromq:master Oct 12, 2020
@TheButlah TheButlah deleted the futures_codec branch October 12, 2020 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants