|
|
Subscribe / Log in / New account

Hooray!

Hooray!

Posted Sep 27, 2007 14:42 UTC (Thu) by dwheeler (guest, #1216)
Parent article: What every programmer should know about memory, Part 1

I'm delighted to see this series, thanks for running it. It's always frustrated me that people who develop software often have no clue what's going on underneath, and as a result write hideous code. E.G., yes, it does matter what order you access matrices in. I presume this series will eventually get there.

Also: let me say that I like the SI binary prefixes (GiByte, etc.); when computer memories were 48K, the difference between the binary and decimal prefixes didn't matter much, but as everything is getting bigger/faster, the differences have getting bigger too. When you're being imprecise, it doesn't matter, but when you want to be precise (e.g., when describing product specs or presenting a diagnostic report), I find them REALLY helpful. In some circumstances it's also the law: claiming your product does something, but not actually meeting your claims (because you used the wrong prefix) can actually get you hauled into court. There's a much bigger world beyond computing, and they already know what "Giga" means; it's 10^9.


to post comments

Hooray!

Posted Nov 11, 2007 6:24 UTC (Sun) by zooko (guest, #2589) [Link] (1 responses)

When we dealt with numbers in the thousands (10^3), approximating a kilo as 2^10 was only 2.5%
off.  Now that we routinely deal with numbers in the billions (10^9), approximating a giga as
2^30 is 7.5% off.  Some of us already deal with numbers in the trillions (10^12), and
approximating a tera as 2^40 is a full 10% off!

Now if you do binary arithmetic in your head, so that when you see 14,463,188,475,466, you
instantly know that it is 13.2 * 2^40, then this comment doesn't apply to you.  But you don't.
When you see "14,463,188,475,466" you approximate it in your head as "14.5 gigs".  If you tell
someone else that you are looking at 14.5 gigs, and they think that you mean 14.5 2^40's, then
they are overestimating the number you are looking at by more than 10%!

See also:

http://en.wikipedia.org/wiki/SI_prefix

A "kilo" has meant 10^3 to the scientific world since 1795.  A "tera" has meant 10^12 since
1960.  Programmers use of units are eventually going to have to become compatible with the
larger scientific world, not least because the numbers we deal with are getting bigger.

Hooray!

Posted Nov 11, 2007 6:28 UTC (Sun) by zooko (guest, #2589) [Link]

Argh -- I shouldn't post to LWN while sleepy.

While lecturing people about the value of using precise terminology, I accidentally wrote
"gigs" when I meant "teras".

If it had been gigs, the people in the example would have been only 7.5% off.

Sorry about that.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds