Skip to content

Conversation

@robertwb
Copy link
Contributor

@robertwb robertwb commented Jun 8, 2018

Specifying language_level=3 allows the dict.items() optimization.

This is about a 40% speedup for 1-element dicts as well as cleaner code.


Follow this checklist to help us incorporate your contribution quickly and easily:

  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.

@robertwb
Copy link
Contributor Author

robertwb commented Jun 8, 2018

R: @RobbeSneyders, @tvalentyn

Copy link
Contributor

@tvalentyn tvalentyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I think this is the way to go. Glad we have a Cython expert in Beam community :)

LGTM modulo lint: W: 37, 0: Unused import sys (unused-import)

@RobbeSneyders
Copy link
Contributor

Thanks! LGTM

Specifying language_level=3 allows the dict.items() optimization.

This is about a 40% speedup for 1-element dicts as well as cleaner code.
@robertwb robertwb merged commit bf4ce01 into apache:master Jun 8, 2018
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.

3 participants