On Wed, Apr 2, 2014 at 4:25 PM, Robert O'Callahan <rob...@ocallahan.org> wrote: > If we could get the JS engine to use evil-UTF8 with some hack to handle > charAt and friends efficiently (e.g. tacking on a UCS-2 version of the > string when necessary)
Have we instrumented Gecko to find out what the access patterns are like? If the main performance-sensitive access pattern is sequential iteration over the string, instead of storing a UCS-2 copy, we could store the next expected UCS-2 index and the next UTF-8 index. charAt would then start by comparing if its argument equals the next expected UCS-2 index in which case read would start at the next UTF-8 index. -- Henri Sivonen hsivo...@hsivonen.fi https://hsivonen.fi/ _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo