Skip to content

Chronicle Map usage suggestions #4

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

Closed
benalexau opened this issue Jul 7, 2016 · 1 comment
Closed

Chronicle Map usage suggestions #4

benalexau opened this issue Jul 7, 2016 · 1 comment

Comments

@benalexau
Copy link
Member

I sent @leventov an email and asked for any usage suggestions. Two changes were suggested:

  1. Change readKey to use map.getUsing(r.wkb.byteArray(), r.wvb.byteArray())
  2. Change the map initialization to use constant(Key|Value)SizeBySample(..) as the sizes are fixed

I'll apply these shortly.

@benalexau
Copy link
Member Author

When run withjava -jar target/benchmarks.jar -rf csv -foe true -p sequential=true,false -p valSize=4000 Chronicle:

$ cat before.csv
"Benchmark","Mode","Threads","Samples","Score","Score Error (99.9%)","Unit","Param: intKey","Param: num","Param: sequential","Param: valRandom","Param: valSize"
"org.lmdbjava.bench.Chronicle.readKey","sample",1,3,4862.596437,42257.271469,"ms/op",true,1000000,true,false,4000
"org.lmdbjava.bench.Chronicle.readKey","sample",1,3,10134.836565,260810.593293,"ms/op",true,1000000,false,false,4000
"org.lmdbjava.bench.Chronicle.write","sample",1,3,3437.931179,116.885801,"ms/op",true,1000000,true,false,4000
"org.lmdbjava.bench.Chronicle.write","sample",1,3,3533.002069,650.792600,"ms/op",true,1000000,false,false,4000

$ cat after.csv
"Benchmark","Mode","Threads","Samples","Score","Score Error (99.9%)","Unit","Param: intKey","Param: num","Param: sequential","Param: valRandom","Param: valSize"
"org.lmdbjava.bench.Chronicle.readKey","sample",1,3,2255.137451,220.893402,"ms/op",true,1000000,true,false,4000
"org.lmdbjava.bench.Chronicle.readKey","sample",1,3,2186.630485,971.930967,"ms/op",true,1000000,false,false,4000
"org.lmdbjava.bench.Chronicle.write","sample",1,3,3474.281813,1061.208318,"ms/op",true,1000000,true,false,4000
"org.lmdbjava.bench.Chronicle.write","sample",1,3,3383.405227,842.875501,"ms/op",true,1000000,false,false,4000

$ grep Bytes before.txt
Bytes   4107702272  org.lmdbjava.bench.Chronicle.readKey-SampleTime-intKey-true-num-1000000-sequential-true-valRandom-false-valSize-4000
Bytes   4107702272  org.lmdbjava.bench.Chronicle.readKey-SampleTime-intKey-true-num-1000000-sequential-false-valRandom-false-valSize-4000

$ grep Bytes after.txt
Bytes   4017057792  org.lmdbjava.bench.Chronicle.readKey-SampleTime-intKey-true-num-1000000-sequential-true-valRandom-false-valSize-4000
Bytes   4017082368  org.lmdbjava.bench.Chronicle.readKey-SampleTime-intKey-true-num-1000000-sequential-false-valRandom-false-valSize-4000

Thanks @leventov! A nice readKey improvement, and even slightly more space efficient on disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant