1. 20 Jul, 2020 1 commit
    • Michael Müller's avatar
      [core] Add Entry API for storage2::HashMap (#477) · eeb6bc0f
      Michael Müller authored
      * [core] Add Entry API for storage2::HashMap
      
      * [core] Replace unwrap's with expect's
      
      * [core] Shorten code
      
      * [core] Improve tests
      
      * [core] Improve tests
      
      * [core] Add benches for storage2::HashMap Entry API
      
      * [core] Update comments
      
      * [core] Add + update benches
      
      * [core] Improve benches code, add more benches
      
      * [core] Improve expect messages
      
      * [core] Simplify test structure
      
      * [core] Implement review comments
      
      * [core] Shorten bench code
      
      * [core] Fix bench iterations
      
      * [core] Minimze black_box'es
      
      * [core] Remove code dups
      
      * [core] Shorten code
      eeb6bc0f
  2. 10 Jul, 2020 1 commit
    • Michael Müller's avatar
      [core] Optimize dynamic storage allocator (#472) · e96513a6
      Michael Müller authored
      * [core] Fix typos
      
      * [core] Add BitStash::is_completely_full()
      
      * [core] Split logic and get rid of loop
      
      * [core] Add benchmarks for storage2::BitStash
      
      * [core] Shorten code
      
      * [core] Remove outcommented code
      
      * [core] Get rid of warnings
      
      * [core] Apply cargo fmt
      
      * [core] Remove unnecessary mutable
      
      * [core] Remove unnecessary check
      
      * [core] Add more storage2::BitStash benchmarks
      
      * [core] Fix benches (panics for empty_cache::one_put)
      
      * [core] Fix empty_cache::one_put bench
      
      * Revert "[core] Remove outcommented code"
      
      This reverts commit 98a74324.
      
      * [core] Improve benchmark labels
      
      * [core] Use iter_batched_ref consistently
      
      * [core] Remove unnecessary black_box
      
      * Revert "Revert "[core] Remove outcommented code""
      
      This reverts commit aaf24713.
      
      * [core] Satisfy clippy
      e96513a6
  3. 07 Jul, 2020 1 commit
    • Michael Müller's avatar
      [core] Add storage2::Lazy::set(…) (#466) · 68ac2124
      Michael Müller authored
      
      
      * [core] Fix typo
      
      * [core] Add Lazy::set(…)
      
      * [core] Add benchmarks for Lazy::set(…)
      
      * [core] Improve comments
      
      * [core] Set must not write to contract storage
      
      * [core] Benchmark set vs deref_mut (not set vs get_mut + assign)
      
      * [core] Bench with Lazy instead of LazyCell
      
      * Update core/src/storage2/lazy/lazy_cell.rs
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      * [core] Rename file
      
      * [core] Push actual Lazy<i32> when returning Lazy<i32>
      
      * [core] Add elaborate set() test with push/pull
      
      * [core] Shorten code
      
      * [core] Fix 0 ps issue with criterion
      
      * [core] Remove unnecessary comment
      
      * [core] Add #[inline] attribute
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      68ac2124
  4. 22 Jun, 2020 1 commit
    • Michael Müller's avatar
      Implement storage2::Stash::remove_occupied unsafe function (#440) · cf6e7106
      Michael Müller authored
      
      
      * [core] Add stash::remove()
      
      * [core] Add benchmarks: take() vs remove()
      
      * [core] Add benchmark for worst case of take()
      
      * [core] Make worst case test even worse
      
      * [core] Add assertions
      
      * [core] Rename stash.remove() to stash.remove_occupied() and make it unsafe
      
      * [core] Add code for linking list entries when removing one
      
      * [core] Add test for remove with multiple push/pulls
      
      * [core] Improve code
      
      * [core] Do not actually read value in remove_occupied()
      
      * [core] Make clippy happy
      
      * [core] Upgrade criterion
      
      * [core] Remove unnecessary code branches
      
      * [core] Refactor logic
      
      * [core] Rename file
      
      * [core] Remove criterion temporarily
      
      * Add new ops for storage2/vec (#453)
      
      * Fix typo
      
      * [core] Add vec.set()
      
      * [core] Add vec.clear()
      
      * [core] Add benchmarks for vec.put() and vec.clear()
      
      * [core] Minor improvements
      
      * [core] Add user comment
      
      * [core] Improve style
      
      * [core] Add worst case benches
      
      * [core] Include comments from review
      
      * [core] Apply cargo fmt
      
      * [core] Remove unnecessary variable
      
      * [core] Include put worst case bench
      
      * [core] Rename benches to lazy vs. cached
      
      * [core] Reduce benchmark overhead by preventing cache writes
      
      * [core] Add black boxes to prevent over optimization
      
      * [core] improve benchmarks for new storage vector operations (#457)
      
      * [core] optimize LazyIndexMap::put
      
      * [core] put some forgotten black_box instances
      
      * [core] further minor improvements to the benchmarks
      
      * [core] Add criterion dependency workaround
      
      * [core] Change vec.set() to return Result<(), IndexOutOfBounds>
      
      * [core] Remove outdated comment
      
      * [core] Minor fixes
      
      * [core] Minor test fixes
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      * [core] Structure and update benches
      
      * [core] Address 'unused Result that must be used'
      
      * [core] Clean up code
      
      * [core] Remove outdated files
      
      * [core] Apply cargo fmt
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      * [core] Wrap comment
      
      * [core] Constrain mutability
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      cf6e7106
  5. 19 Jun, 2020 1 commit
    • Michael Müller's avatar
      Add new ops for storage2/vec (#453) · d4cbfcea
      Michael Müller authored
      
      
      * Fix typo
      
      * [core] Add vec.set()
      
      * [core] Add vec.clear()
      
      * [core] Add benchmarks for vec.put() and vec.clear()
      
      * [core] Minor improvements
      
      * [core] Add user comment
      
      * [core] Improve style
      
      * [core] Add worst case benches
      
      * [core] Include comments from review
      
      * [core] Apply cargo fmt
      
      * [core] Remove unnecessary variable
      
      * [core] Include put worst case bench
      
      * [core] Rename benches to lazy vs. cached
      
      * [core] Reduce benchmark overhead by preventing cache writes
      
      * [core] Add black boxes to prevent over optimization
      
      * [core] improve benchmarks for new storage vector operations (#457)
      
      * [core] optimize LazyIndexMap::put
      
      * [core] put some forgotten black_box instances
      
      * [core] further minor improvements to the benchmarks
      
      * [core] Add criterion dependency workaround
      
      * [core] Change vec.set() to return Result<(), IndexOutOfBounds>
      
      * [core] Remove outdated comment
      
      * [core] Minor fixes
      
      * [core] Minor test fixes
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      d4cbfcea