On 04/02/2014 17:15, Daniel Hackney wrote:
Simon Sapin <simon.sa...@exyr.org> wrote:
If you have speculative lexing (str -> [Token]) followed by "block and
function grouping" ([Token] -> [ComponentValue]) in order to get equivalent
functionality to rust-cssparser, do you still get speedups compared to
current rust-cssparser? (Which does str -> [ComponentValue])

I haven't investigated it. It would require writing a [Token] ->
[ComponentValue] function, which I didn't yet do for the academic
project. My suspicion is that the lexing takes the bulk of the time,
since CSS doesn't have a very complicated structure, but I haven't
measured it.

If you’re interested in investigating this I can write the [Token] -> [ComponentValue] function. It should be rather short.


If you think this is something Servo might want to incorporate, I could
look into implementing the parser.

My point above was that once you have [ComponentValue], plugging with the rest of the parser should be easy.

As to incorporating in Servo I don’t know. It’d need someone working on it (including to decide if the speedups are worth the overhead), and may not be a priority right now. But we definitely should at least investigate it at some point.

Thanks for sharing!
--
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to