Another shot at an improved DOMString representation. This one uses one of 3 representations: either a String, an inlined string (for < 16 bytes) or an interned string:
https://github.com/asajeffrey/servo/tree/domstring-use-atom-or-inlined-string I did lots of hoop-jumping to get it to fit in the same 3 words as a String. The performance is still worse than just using a String. Even more baffling, it uses more memory if you point it at en.wikipedia.org. I can understand a time penalty caused by straight-line code becoming branching, but I don't understand a memory penalty. On Wed, Dec 2, 2015 at 4:03 PM, Boris Zbarsky <bzbar...@mit.edu> wrote: > On 12/2/15 4:23 PM, Andrew McCreight wrote: > >> For what it is worth, Gecko uses a single-entry per-zone cache for >> converting the result of JS strings to DOM strings in getAttribute (I >> think) >> > > No, that's the other direction: DOM strings to JS strings. > > -Boris > > _______________________________________________ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo