Skip to content

Commit

Permalink
accumulator/forestdata: Improvements to cowforest (#256)
Browse files Browse the repository at this point in the history
CowForest has slightly better caching now and faster flush and restore
from disk. Is not backwards compatible with a previously saved cowforest
  • Loading branch information
kcalvinalvin authored Feb 22, 2021
1 parent d2cf325 commit 259fc1a
Show file tree
Hide file tree
Showing 4 changed files with 284 additions and 162 deletions.
4 changes: 1 addition & 3 deletions accumulator/forest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ func TestDeleteReverseOrder(t *testing.T) {
}

func TestForestAddDel(t *testing.T) {

numAdds := uint32(10)

f := NewForest(nil, false, "", 0)

sc := NewSimChain(0x07)
sc.lookahead = 400

for b := 0; b < 1000; b++ {

Expand All @@ -55,7 +53,7 @@ func TestCowForestAddDelComp(t *testing.T) {
numAdds := uint32(1000)

tmpDir := os.TempDir()
cowF := NewForest(nil, false, tmpDir, 500)
cowF := NewForest(nil, false, tmpDir, 2500)
memF := NewForest(nil, false, "", 0)

sc := NewSimChain(0x07)
Expand Down
Loading

0 comments on commit 259fc1a

Please sign in to comment.