Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support output to files directly instead of just via output redirection #193

Closed
saethlin opened this issue Oct 6, 2020 · 1 comment · Fixed by #206
Closed

Support output to files directly instead of just via output redirection #193

saethlin opened this issue Oct 6, 2020 · 1 comment · Fixed by #206

Comments

@saethlin
Copy link
Contributor

saethlin commented Oct 6, 2020

In my profiles I'm seeing 3.3% of cycles spent in std::memchr::memchr, because the standard library's stdout wrapper is trying to detect newlines and flush on them. Which is silly.

@jonhoo
Copy link
Owner

jonhoo commented Oct 13, 2020

Ah, yes, that's a good idea. I think in theory it should be pretty easy to have the structure hold a dyn Write that defaults to stdout maybe. We could make it generic over Write, though that'd be backwards incompatible, and the performance difference is unlikely to make too much of a difference. Will also probably save us from having to frequently unlock and re-lock stdout!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants