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

feat: more performance optimizations #92

Merged
merged 1 commit into from
Aug 5, 2020
Merged

feat: more performance optimizations #92

merged 1 commit into from
Aug 5, 2020

Conversation

software-dov
Copy link
Contributor

@software-dov software-dov commented Aug 5, 2020

The two big changes here are bypassing init in a special case and
directly setting instance attributes via reaching into self.dict.
These are optimizations in a potential hot path that were isolated via
exhaustive profiling and experimentation and save ~%16 in certain benchmarks.

Do not try this at home.

The two big changes here are bypassing __init__ in a special case and
directly setting instance attributes via reaching into self.__dict__.
These are optimizations in a potential hot path that were isolated via
exhaustive profiling and experimentation.

Do not try this at home.
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 5, 2020
@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #92 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #92   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          809       811    +2     
  Branches       136       136           
=========================================
+ Hits           809       811    +2     
Impacted Files Coverage Δ
proto/message.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6094f9f...2269480. Read the comment docs.

@software-dov software-dov merged commit 19b1519 into googleapis:master Aug 5, 2020
@software-dov software-dov deleted the unholy-tweaks branch August 5, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants