Skip to content
/ floff Public

A test repository for the WIP algorithm for fixed-precision floating-point formatting.

License

Apache-2.0, BSL-1.0 licenses found

Licenses found

Apache-2.0
LICENSE-Apache2-LLVM
BSL-1.0
LICENSE-Boost
Notifications You must be signed in to change notification settings

jk-jeon/floff

Repository files navigation

floff

A test repository for the WIP algorithm for fixed-precision floating-point formatting.

An explanation of the algorithm is given here.

For quick experiment: https://godbolt.org/z/5948en1zo

Here is how it performs for printing double:

benchmark

  • Red: Proposed algorithm with the full (9904 bytes) cache table and the long (3680 bytes) extended cache table.
  • Green: Proposed algorithm with the compressed (584 bytes) cache table and the super-compact (580 bytes) extended cache table.
  • Blue: Ryū-printf (reference implementation).
  • Purple: fmtlib (a variant of Grisu3 with Dragon4 fallback).

Compiled binary size of the benchmark program:

                                base : 1,022,464 bytes
                floff full-long only : 1,050,112 bytes (base +  27,648 bytes)
 floff compressed-super-compact only : 1,040,384 bytes (base +  17,920 bytes)
                     Ryu-printf only : 1,133,568 bytes (base + 111,104 bytes)
                above three together : 1,180,160 bytes (base + 157,696 bytes)

About

A test repository for the WIP algorithm for fixed-precision floating-point formatting.

Resources

License

Apache-2.0, BSL-1.0 licenses found

Licenses found

Apache-2.0
LICENSE-Apache2-LLVM
BSL-1.0
LICENSE-Boost

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published