[ https://issues.apache.org/jira/browse/CASSANDRA-9989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510282#comment-16510282 ]
Jay Zhuang commented on CASSANDRA-9989: --------------------------------------- [~jasobrown] Here is the latest rebased code: | Branch | uTest | | [9989|https://github.com/cooldoger/cassandra/tree/9989] | [!https://circleci.com/gh/cooldoger/cassandra/tree/9989.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/9989] | [A benchmark test|https://github.com/cooldoger/cassandra/commit/048f465d9872f5645a809666aefee503f9331736] is added first, so we could run the same test ({{$ ant microbench -Dbenchmark.name=BTreeBuildBench.buildTreeTest}}) before and after the patch. Here is the test result on my host, basically it improves the bTree build ({{2x-4x}}) for a non-leaf tree ({{>32 elements}}), and no impact on leaf tree ({{<=32 elements}}) build, which is just an array, it's already optimized: {noformat} Without Fix [java] Benchmark (dataSize) Mode Cnt Score Error Units [java] BTreeBuildBench.buildTreeTest 1 thrpt 16 140871.759 ± 5077.103 ops/ms [java] BTreeBuildBench.buildTreeTest 2 thrpt 16 135774.492 ± 6064.639 ops/ms [java] BTreeBuildBench.buildTreeTest 5 thrpt 16 126986.466 ± 3699.703 ops/ms [java] BTreeBuildBench.buildTreeTest 10 thrpt 16 101731.894 ± 3567.127 ops/ms [java] BTreeBuildBench.buildTreeTest 20 thrpt 16 70327.305 ± 2503.299 ops/ms [java] BTreeBuildBench.buildTreeTest 40 thrpt 16 8623.271 ± 986.412 ops/ms [java] BTreeBuildBench.buildTreeTest 100 thrpt 16 1681.114 ± 128.078 ops/ms [java] BTreeBuildBench.buildTreeTest 1000 thrpt 16 412.908 ± 32.097 ops/ms [java] BTreeBuildBench.buildTreeTest 10000 thrpt 16 27.509 ± 14.482 ops/ms [java] BTreeBuildBench.buildTreeTest 100000 thrpt 16 4.615 ± 0.187 ops/ms {noformat} With Fix: {noformat} [java] Benchmark (dataSize) Mode Cnt Score Error Units [java] BTreeBuildBench.buildTreeTest 1 thrpt 16 147053.344 ± 6292.209 ops/ms [java] BTreeBuildBench.buildTreeTest 2 thrpt 16 135013.312 ± 4265.301 ops/ms [java] BTreeBuildBench.buildTreeTest 5 thrpt 16 122254.600 ± 3937.228 ops/ms [java] BTreeBuildBench.buildTreeTest 10 thrpt 16 102739.551 ± 1937.640 ops/ms [java] BTreeBuildBench.buildTreeTest 20 thrpt 16 71638.531 ± 2005.118 ops/ms [java] BTreeBuildBench.buildTreeTest 40 thrpt 16 21514.998 ± 985.831 ops/ms [java] BTreeBuildBench.buildTreeTest 100 thrpt 16 11495.212 ± 526.143 ops/ms [java] BTreeBuildBench.buildTreeTest 1000 thrpt 16 1469.110 ± 57.081 ops/ms [java] BTreeBuildBench.buildTreeTest 10000 thrpt 16 114.110 ± 4.330 ops/ms [java] BTreeBuildBench.buildTreeTest 100000 thrpt 16 11.910 ± 0.502 ops/ms {noformat} > Optimise BTree.Buider > --------------------- > > Key: CASSANDRA-9989 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9989 > Project: Cassandra > Issue Type: Sub-task > Reporter: Benedict > Assignee: Jay Zhuang > Priority: Minor > Fix For: 4.x > > Attachments: 9989-trunk.txt > > > BTree.Builder could reduce its copying, and exploit toArray more efficiently, > with some work. It's not very important right now because we don't make as > much use of its bulk-add methods as we otherwise might, however over time > this work will become more useful. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org