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

Improve FlipRightBit by doing it directly. #1610

Merged
merged 1 commit into from
May 16, 2019

Conversation

Martin2112
Copy link
Contributor

Seems roughly 6x faster, called for every level in the tree via Siblings() -> Neighbour() in the sparse Merkle code.

BenchmarkFlipRightBit-12    	200000000	         9.19 ns/op
BenchmarkFlipRightBit-12    	2000000000	         1.62 ns/op

Checklist

Seems roughly 6x faster, called for every level in the tree via
Siblings() in the sparse merkle code.

BenchmarkFlipRightBit-12    	200000000	         9.19 ns/op
BenchmarkFlipRightBit-12    	2000000000	         1.62
ns/op
@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #1610 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1610   +/-   ##
=======================================
  Coverage   67.13%   67.13%           
=======================================
  Files         110      110           
  Lines        8962     8962           
=======================================
  Hits         6017     6017           
  Misses       2341     2341           
  Partials      604      604
Impacted Files Coverage Δ
storage/types.go 98.28% <100%> (ø) ⬆️

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 8a96488...7329014. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #1610 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1610   +/-   ##
=======================================
  Coverage   67.13%   67.13%           
=======================================
  Files         110      110           
  Lines        8962     8962           
=======================================
  Hits         6017     6017           
  Misses       2341     2341           
  Partials      604      604
Impacted Files Coverage Δ
storage/types.go 98.28% <100%> (ø) ⬆️

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 8a96488...7329014. Read the comment docs.

@Martin2112 Martin2112 merged commit 9366bd2 into google:master May 16, 2019
@Martin2112 Martin2112 deleted the flipping_bits branch May 16, 2019 14:33
gdbelvin added a commit that referenced this pull request May 17, 2019
* master: (54 commits)
  Couple of changes to make NodeIDs more frugal. (#1613)
  compact.Tree: Change semantic of adding leaves (#1592)
  MapHasher: Do not return error from HashLeaf (#1611)
  Move Postgres schema into "schema" subdirectory
  Move MySQL schema into "schema" subdirectory
  Improve FlipRightBit by doing it directly. (#1610)
  log_subtree_cache: Use compact Range instead of Tree (#1609)
  LogHasher: Return no error from HashLeaf method (#1608)
  Remove update_changelog.sh
  Fewer copies of the bytes from big.Int (#1602)
  Switch some low-level logging in hashing related code to 'if' guards (#1601)
  Merge pull request #1596 from RJPercival/del_dockerfile_db
  Correct name of "licenses" binary in .gitignore
  compact.Tree: Allow nil visitor and add benchmarks (#1599)
  Add timeout to sequencing context (#1595)
  Combine `go install` commands in .travis.yml
  Combine `go get` commands in .travis.yml
  Sort `go get` commands in .travis.yml
  Rename "indirect/external.go" to "indirect/indirect.go"
  Fix typo: "TestLibaries" -> "TestLibraries"
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants