7
rustdoc-json: buffer output by aDotInTheVoid · Pull Request #93954 · rust-lang/r...
source link: https://github.com/rust-lang/rust/pull/93954
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
It turns out we were doing syscalls for each part of the json syntax
Before:
...
[pid 1801267] write(5, "\"", 1) = 1
[pid 1801267] write(5, ",", 1) = 1
[pid 1801267] write(5, "\"", 1) = 1
...
After:
[pid 1974821] write(5, "{\"root\":\"0:0\",\"crate_version\":nu"..., 1575) = 1575
In one benchmark (one struct, almost all time in std
), this gives ~2x perf
r? @CraftSpider
@rustbot modify labels: +A-rustdoc-json +T-rustdoc -A-testsuite
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK