From: Jean Privat Date: Wed, 27 Aug 2014 15:11:16 +0000 (-0400) Subject: Merge: Less char boxings X-Git-Tag: v0.6.8~7 X-Git-Url: http://nitlanguage.org Merge: Less char boxings Because of the way the boxing is done in nitg-s, the services in the `Text::chars` view cause unnecessary boxing of chars. After profiling, we found that the biggest consumers of such boxing are `Lexer::get_token` and `BufferedIStream::read_all`. Thus, the idea is to implement a efficient `Text::[]` method that do not use the `chars` view. Then to update the two consumers to use it instead. With `nitg nitg.nit`, the total gain is approx 5%, and the number of boxes of char is reduced by 70% (from 4.8Mboxes to 1.4Mboxes). Note: this is only an easy workaround until the boxing is done better in nitg (mid-term goal) Pull-Request: #688 Reviewed-by: Lucas Bajolet Reviewed-by: Alexandre Terrasa --- da25554d40444ce4984d37f4564042900cdeea8f