[ https://issues.apache.org/jira/browse/CASSANDRA-9989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16596964#comment-16596964 ]
Benedict commented on CASSANDRA-9989: ------------------------------------- Much nicer, conceptually and aesthetically. It's a shame it means an extra integer division on each iteration; the latency for this varies between 14-30 cycles on latest CPUs. Does it have a measurable impact on the performance of the patch? Ordinarily I'd try to avoid it, but it makes the code a lot clearer. The alternative is to precompute an index we will switch from rounding-up to rounding-down. This will definitely be cheaper, but slightly less clean. If the microbenchmarks show no big downside, I'm +1 the patch whichever way you prefer. > 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