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

Unit standardisation #58

Closed
eileen-kuehn opened this issue Nov 4, 2019 · 2 comments · Fixed by #59
Closed

Unit standardisation #58

eileen-kuehn opened this issue Nov 4, 2019 · 2 comments · Fixed by #59

Comments

@eileen-kuehn
Copy link
Member

eileen-kuehn commented Nov 4, 2019

We should decide the standardisation of units through the simulation. We should further decide on the i, so either KiB or KB (no matter what if K or M or G or ...). Currently I think we use GB.

Concerning the storage size, I recommend deciding on one data size unit and sticking to it. If we use Bytes then float is enough to represent up to 8 PiB precisely increasing with the prefix (e.g. 8 EiB for KiB base); Since there are no fractional Bytes, using int would allow for arbitrarily large and precise storage size even when using Bytes.

Originally posted by @maxfischer2781 in #53

@maxfischer2781
Copy link
Member

Using plain bytes has the least problems in standardisation (we do not need to decide on KiB versus KB etc.) and is always precise when using int. However, it might degrade to float during naive computations, which is imprecise beyond 8PB.

@maxfischer2781
Copy link
Member

After some testing, I strongly favour int in Bytes. The only issue is silent coercion, but that can be covered by type checkers easily.

In contrast, if we use float in GB we have no way whatsoever to check against accidentally using a different unit.

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 a pull request may close this issue.

2 participants