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

Rewrite io + Enable CI #6

Merged
merged 43 commits into from
Oct 1, 2023
Merged

Rewrite io + Enable CI #6

merged 43 commits into from
Oct 1, 2023

Conversation

byeongkeunahn
Copy link
Owner

@byeongkeunahn byeongkeunahn commented Sep 30, 2023

No description provided.

* 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 byeongkeunahn force-pushed the rewrite-io branch 2 times, most recently from 68af465 to 2c62703 Compare October 1, 2023 00:33
@byeongkeunahn byeongkeunahn force-pushed the rewrite-io branch 11 times, most recently from 5c3ed59 to c25244f Compare October 1, 2023 07:28
@byeongkeunahn byeongkeunahn force-pushed the rewrite-io branch 2 times, most recently from f1a8822 to d2514d6 Compare October 1, 2023 07:49
@byeongkeunahn byeongkeunahn changed the title Rewrite io Rewrite io + Enable CI Oct 1, 2023
@byeongkeunahn byeongkeunahn merged commit 2c7d505 into main Oct 1, 2023
6 checks passed
@byeongkeunahn byeongkeunahn deleted the rewrite-io branch December 13, 2023 08:11
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.

1 participant