Merge: Cached ropes
authorJean Privat <jean@pryen.org>
Wed, 29 Jul 2015 02:23:12 +0000 (22:23 -0400)
committerJean Privat <jean@pryen.org>
Wed, 29 Jul 2015 02:23:12 +0000 (22:23 -0400)
Added a wee bit of optimization on Ropes, indexed accesses are properly cached and file manipulations (especially `read_all`) now yields a good balanced Rope, which should reduce the degenerative cases of random indexed access whilst preserving most of the performance in local access.

This has a positive (though small) impact on a the compiler :

* Before: `I   refs:      14,286,788,827`
* After: `I   refs:      14,197,458,800` (-0.63%)

What is seen in Valgrind is unfortunately unchanged in user-time (nitc-sg compiling nitg-sg) :

* Before: `user 0m5.360s`
* After: `user 0m5.367s`

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


Trivial merge