jk-jeon / dragonbox

Reference implementation of Dragonbox in C++
Apache License 2.0
588 stars 37 forks source link

Update the paper reflecting the recent change in integer checks #23

Closed jk-jeon closed 2 years ago

jk-jeon commented 2 years ago

Perhaps it would be possible to apply the rounding trick that Schubfach uses to eliminate some of those ugly integer checks, which will greatly improve the overall performance.

However, it requires a major overhaul of the entire algorithm so it will take time.

jk-jeon commented 2 years ago

Okay, so it might be possible to eliminate the call to is_product_integer (and related branching), at the cost of performing a little bit more operations in compute_mul and compute_mul_parity. While I think the shorter interval case can definitely take advantage of this (as it already follows the flow of Schubfach), for the general case I am currently not very sure if it will improve the overall performance or not. Should look into it some day.

jk-jeon commented 2 years ago

Done, as of 2e3f58c2b53f9967802afd01a6821b355c82ce56. It seems like this gives a little bit of speed-up in average.

I should update the paper as well, it would be a pretty big rewrite.

jk-jeon commented 2 years ago

(Mostly) done: 21400aab099914e9a2cd94f52679554bf9d92069.