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)
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>


Trivial merge