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

[kvdb-rocksdb] Use "pinned" gets to avoid allocations #274

Merged
merged 7 commits into from
Dec 5, 2019

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Nov 28, 2019

This PR uses the get_pinned() API to save an allocation when calling get().

Using the benchmark from #275 there's no noticeable speedup, likely because the vast majority of time is spent in rocksdb so even halving the allocations on the rust side has no noticeable impact.

Also included are some minor cosmetic changes and the rename of drop_column to remove_last_column to make users aware of what the code actually does.

Needs benchmarks to prove it actually matters.
@dvdplm dvdplm self-assigned this Nov 28, 2019
@dvdplm dvdplm marked this pull request as ready for review December 4, 2019 13:24
kvdb-rocksdb/src/lib.rs Show resolved Hide resolved
kvdb-rocksdb/CHANGELOG.md Outdated Show resolved Hide resolved
@dvdplm dvdplm merged commit a095490 into master Dec 5, 2019
@dvdplm dvdplm deleted the dp/perf/use-pinned-gets branch December 5, 2019 09:53
dvdplm added a commit that referenced this pull request Dec 10, 2019
* master:
  Compile triehash for no_std (#280)
  [kvdb-rocksdb] Use "pinned" gets to avoid allocations (#274)
  [kvdb-rocksdb] Release 0.2 (#273)
  [kvdb-rocksdb] switch to upstream (#257)
  travis: try to fix wasmpack chrome test on macOS (#263)
  Use 2018 edition for rustfmt (#266)
  [fixed-hash]: re-export `alloc_` (#268)
  kvdb-web: async-awaitify (#259)
  kvdb-rocksdb: configurable memory budget per column (#256)
  Bump rlp crate version. (#270)
  Introduce Rlp::at_with_offset method. (#269)
  Make fixed-hash test structs public (#267)
  Migrate primitive types to 2018 edition (#262)
  upgrade tiny-keccak to 2.0 (#260)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants