On 8/2/13 1:39 PM, Boris Zbarsky wrote:
1)  How fast is a Reader in practice?  Gecko used to use an input stream
for the parser and switched to a flat character buffer because it was
significantly faster, even if you ignore the cost of Read() calls: the
logic getting the next char became much simpler and compilers became
able to optimize tight loops around it (like number parsing, say) a lot
better.  Before that change, the register spills caused by the possible
function call to fill the buffer from the stream meant the
number-parsing loop code was terrible.

So in practice, parsing from a character buffer might be the right
thing, especially because it's not like we necessarily need incremental
parsing for CSS.

Rust Readers are currently very slow; they're scheduled to be reworked after the new scheduler is done. Perhaps we should keep this test case as a microbenchmark when we redesign the high-level Rust I/O interface.

Patrick

_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to