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

This package should start using the stdlib's Clock and Duration types #21

Open
lorentey opened this issue Mar 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@lorentey
Copy link
Member

Subject says it all -- this package should stop using platform-specific clock APIs (or delegating to Foundation.Date).

It's been a while since we added ContiguousClock/SuspendingClock/Duration to the stdlib, and the restricted availability of these types is less of an issue with every passing day, even on Apple platforms.

The primary difficulty is in making sure we preserve custom formatting of duration values, and that we don't break statistical calculations. Duration is a fixed-width integer count of attoseconds, which I expect to be just as good as or better than the current plain Double for doing the simple statistical calculations in this package -- but this needs to be verified in practice. (Some things could be tricky to express without relying on Int128...)

The format of saved benchmark results will likely need to change to reflect the change in duration representations. That is fine -- this package makes no promises on compatibility of previously saved results.

@lorentey lorentey added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant