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.
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 plainDouble
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 onInt128
...)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.