3 ms·
It's a shame you were voted down. The brevity of the blog post causes it to fly right over the head of the target audience. There is a difference between signif
by bradleyland 15y ago
It's a shame you were voted down. The brevity of the blog post causes it to fly right over the head of the target audience. There is a difference between significant digits in measurement, and significant digits in analysis.
First, a quick definition from Wikipedia [1]: leading and trailing zeros which are merely placeholders to indicate the scale of the number.
In measurement, significant digits indicate the precision of the measurement. This eliminates ambiguity. For example, if I were to write:
> The prongs should be spaced 1.000" on their centers.
This means that the level of precision should be to the thousandths of an inch. If I were to write:
> The prongs should be spaced 1.0" on their centers.
This means the level of precision should be to the tenth of an inch.
The former might be used in the engineering of something like a rocket booster control, while the latter might be used in something like woodworking of rudimentary farm implements (like an ox yolk).
The author's lament is that computer scientists -- although I'm not sure who exactly he's talking bout here -- don't pay attention to the meaning of the significant digits in use.
Let's say I (not a computer scientist) were to publish benchmarks that said:
> Under Ruby 1.9.3-p125, the method DateTime#parse takes 3.098193 seconds to parse the string "2011-05-25 00:00:03 -0400" at 100,000 iterations.
Because I used six digits to the right of the decimal point, I have implied that my level of precision is six digits. Put another way, I'm claiming that my benchmark is accurate to six decimal places. This is obviously not true. The value varies each time I run it, and my system isn't nearly controlled enough (I have lots of other processes running) to express this level of precision.
Most hackers just make this assumption. Because of our familiarity with the subject matter, we know that there is variation in benchmark runtime from execution to execution. Many hackers lack a background in formal engineering training as well, so we don't see the implied precision in significant digits. It is a useful tool for communication, however. I plan to pay more attention to it.