forked from boj-rs/basm-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rewrite io + Enable CI #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* WIP: work in progress
It doesn't make a big difference to call try_flush with a slightly larger amount than strictly necessary, as the actual flush call only happens rarely. Performance on Baekjoon Online Judge 11003 does not regress with this simplification.
This is validated on Baekjoon Online Judge 3745.
`word` reads a single word delimited by ASCII whitespace characters (value at most 0x20) into a prespecified buffer. If the user-supplied buffer is too short, reading stops and function returns. On the other hand, `word_string` uses dynamic allocation and thus is capable of reading arbitrarily long words.
Note that we can call `Writer::str` with `&String` references, as String implements the `Deref` trait to `str`, allowing the type coercion `&String -> &str`.
The ryu crate is basically a faster version of the dtoa crate, with a similar set of APIs (both crates are written by the same author). Ryu is a fast float-to-string conversion algorithm described in an PLDI'18 paper by Ulf Adams. See: https://dl.acm.org/doi/10.1145/3192366.3192369
byeongkeunahn
force-pushed
the
rewrite-io
branch
2 times, most recently
from
October 1, 2023 00:33
68af465
to
2c62703
Compare
byeongkeunahn
force-pushed
the
rewrite-io
branch
11 times, most recently
from
October 1, 2023 07:28
5c3ed59
to
c25244f
Compare
byeongkeunahn
force-pushed
the
rewrite-io
branch
2 times, most recently
from
October 1, 2023 07:49
f1a8822
to
d2514d6
Compare
byeongkeunahn
force-pushed
the
rewrite-io
branch
from
October 1, 2023 07:57
d2514d6
to
dd0d918
Compare
byeongkeunahn
force-pushed
the
rewrite-io
branch
from
October 1, 2023 08:39
cae942f
to
50f25d7
Compare
This reverts commit c12caeb.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.