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

cout operator: optimise for base-16 #110

Open
saxbophone opened this issue May 28, 2022 · 1 comment
Open

cout operator: optimise for base-16 #110

saxbophone opened this issue May 28, 2022 · 1 comment
Labels
blocked This cannot be started until prerequisite(s) are completed good first issue Good for newcomers optimisation
Milestone

Comments

@saxbophone
Copy link
Owner

There's an easy optimisation that can be made when printing Nat objects in base-16 (or indeed, any base that is exactly convertible from Nat::BASE –this is guaranteed to be a power of 2 that is a multiple of 8 (i.e. $2^{8n}$ for $n\in\mathbb{N}$):

Just print each digit in this base, in order. No base-conversion needed.

@saxbophone saxbophone added this to the v0.6 milestone Feb 19, 2023
@saxbophone saxbophone added the blocked This cannot be started until prerequisite(s) are completed label Feb 19, 2023
@saxbophone
Copy link
Owner Author

Blocked on #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This cannot be started until prerequisite(s) are completed good first issue Good for newcomers optimisation
Projects
None yet
Development

No branches or pull requests

1 participant