Merge: Ropes optimizations
authorJean Privat <jean@pryen.org>
Wed, 30 Jul 2014 01:06:51 +0000 (21:06 -0400)
committerJean Privat <jean@pryen.org>
Wed, 30 Jul 2014 01:06:51 +0000 (21:06 -0400)
commite77630ccb492899691e52f3cc70430dfa0ad06d3
treee7b70eee0bfb18171e0b981bd6dbbcdaade799ea
parent04f448174ff6a36997e29d5ad767b5f750b25423
parent9e88d190f645c5625af76f81075c856eb02cdf87
Merge: Ropes optimizations

Small optimizations on Rope, significantly speeds-up concatenation and indexed access, however, slows substring.

Before :
 * `./substr_bench -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.12s
 * `./chain_concat -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 1.47s
 * `./iteration_bench -m rope --iter-mode index --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 20.95s

After :
 * `./substr_bench -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.36s
 * `./chain_concat -m rope --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 0.25s
 * `./iteration_bench -m rope --iter-mode index --loops 100000 --strlen 25 --ccts 10 NIT_GC_CHOOSER=large` => 1.47s

Pull-Request: #626
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>