NEW209314
Reconsider WTF:KB, WTF::MB, WTF::GB
https://bugs.webkit.org/show_bug.cgi?id=209314
Summary Reconsider WTF:KB, WTF::MB, WTF::GB
Michael Catanzaro
Reported 2020-03-19 15:24:44 PDT
We have, in StdLibExtras.h: static constexpr size_t KB = 1024; static constexpr size_t MB = 1024 * 1024; static constexpr size_t GB = 1024 * 1024 * 1024; That's actually KiB, MiB, and GiB. We should call them KiB, MiB, and GiB, not KB, MB, GB. KB would be 1000 (10^3). MB would be 10^4. GB would be 10^5. This isn't pedantic, it's something that's important to be precise about since there's a big difference between the units. It can be extremely confusing when precision is required and the units are not as expected. E.g.: https://duckduckgo.com/?q=500+GB+to+GiB&ia=answer https://en.wikipedia.org/wiki/Orders_of_magnitude_(data)
Attachments
Michael Catanzaro
Comment 1 2020-03-19 15:26:51 PDT
(In reply to Michael Catanzaro from comment #0) > MB would be 10^4. GB would be 10^5. This will live on the internet forever to embarrass me. Yes, that's not how math works. MB is 10^6 and GB is 10^9....
Note You need to log in before you can comment on or make changes to this bug.