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

Do not flush buffer every newline #14

Merged
merged 1 commit into from
May 24, 2020

Conversation

sstadick
Copy link
Contributor

Adding STDOUT.flush_on_newline = false to the crystal bedcov implementation otherwise it flushes every line. On my laptop this gives bedcov nearly a 3.5 second speedup.

Relevant issue / forum posts from Crystal:

@lh3 lh3 merged commit 9827130 into lh3:master May 24, 2020
@lh3
Copy link
Owner

lh3 commented May 24, 2020

Thanks!

lh3 added a commit that referenced this pull request May 24, 2020
@lh3
Copy link
Owner

lh3 commented May 24, 2020

Tables in README have been updated. Your change is indeed faster. Sort of surprising given that stdout is not frequently flushed in C. Stderr is flushed frequently.

@sstadick
Copy link
Contributor Author

Well, I think this change puts it more in line with C. It was flushing every newline, now it flushes less frequently.

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

Successfully merging this pull request may close these issues.

2 participants