Merge: Text optimization
authorJean Privat <jean@pryen.org>
Sat, 29 Aug 2015 16:12:03 +0000 (12:12 -0400)
committerJean Privat <jean@pryen.org>
Sat, 29 Aug 2015 16:12:03 +0000 (12:12 -0400)
This PR introduces some more bookkeeping to Texts variants, some more work is to be expected at compilation-time for the generation of FlatStrings with all the information, but this should improve execution speeds in clients.

`./chain_concat -m string --loops 1000000 --strlen 15 --ccts 20`

* Before:
4.42 4.48 4.51 4.5025 "20"
* After:
2.40 2.36 2.38 2.37 "20"

`time ./bin/nitc --semi-global src/nitc.nit -o bin/nitc` best of 10:

* Before
~~~
real  0m6.075s
user  0m4.624s
sys   0m0.826s
~~~

* After
~~~
real  0m6.172s
user  0m4.751s
sys   0m0.870s
~~~

Valgrind:

* Before; GIr: 14,768,723,784
* After; GIr: 14,775,119,149

Pull-Request: #1663
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

1  2 
lib/core/text/abstract_text.nit
lib/core/text/flat.nit

Simple merge
Simple merge