about summary refs log tree commit diff
path: root/src/etc/dec2flt_table.py
AgeCommit message (Collapse)AuthorLines
2020-04-10Enforce Python 3 as much as possibleGuillaume Gomez-1/+1
2020-02-07remove unnecessary sys importChris Simpkins-1/+1
2019-11-29Make dec2flt_table compatible with rustfmtDavid Tolnay-5/+10
2018-12-25Remove licensesMark Rousskov-20/+0
2016-01-12Speed up dec2flt fast path with additional tables.Robin Kruppe-6/+29
Add tables of small powers of ten used in the fast path. The tables are redundant: We could also use the big, more accurate table and round the value to the correct type (in fact we did just that before this commit). However, the rounding is extra work and slows down the fast path. Because only very small exponents enter the fast path, the table and thus the space overhead is negligible. Speed-wise, this is a clear win on a [benchmark] comparing the fast path to a naive, hand-optimized, inaccurate algorithm. Specifically, this change narrows the gap from a roughly 5x difference to a roughly 3.4x difference. [benchmark]: https://gist.github.com/Veedrac/dbb0c07994bc7882098e
2015-08-08Script for generating the powers-of-ten tables necessary for correct andRobin Kruppe-0/+134
fast decimal-to-float conversions.