converting to markdown so the links are clickable
Measure elapsed time at inside of execute() Split without array size
It needs for delete anyway (see lib/red_black_tree.rb in avl_tree gem.) and it avoids indirect indy binding with the current JRuby.
Use IO#gets instead of File#each_line to get the method linked directly. IO#gets is already optimized about frame handling so indy can link directly.
jruby -Ilib bench/bench.rb resource/010000.csv
I was unaware that LL RBTree is faster in addition to it's simpler. See more detail at http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf Trees are rebalanced in 'left leaning' manner after insert so you don't see '-' as results of dump_sexp (See updated test expectations.) Thanks Gaku Nakamura-san for letting me know this by implementing Scala version of RBTreeMap!
Show elapsed time of the last execution.
Who can understand 'protected methods' of Ruby in 5 minutes? :)
Reduce method definition duplication. It improves the performance in addition to simplify the code for explanation.
No need to do recursive call. Perf becomes slightly better.
For perf and readability. Introduced RBTree#need_rebalance? and removed unnecesarry conditions to be checked for rebalance after insert.
Not needed for this benchmark. Use avl_tree instead for actual Red-black tree implementation.
Also, remove height() health check from regulation.
extract required impl only
As the result of discussion in ML. No need to care for benchmarking. Also fixed the bug in height definition. Height of empty list is 1, not 0.