It's hard to beat raw buffer access. We shouldn't try to be too smart
here. Do we have *safe* raw buffer access options on the boards? (E.g.,
XDR inline from the old days: a way to ask for contiguous,
inline-function-deserializable memory?)
/be
Patrick Walton wrote:
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
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo