aboutsummaryrefslogtreecommitdiff
path: root/dev/bugzilla2github_stripped.csv
diff options
context:
space:
mode:
authorGuillaume Melquiond2020-10-02 18:17:23 +0200
committerGuillaume Melquiond2020-11-13 15:14:35 +0100
commitef3ec53e4f74f32a705489b332b037569680d28e (patch)
tree2747eea9583d288ba99c01326a09ac19bcbf3d1e /dev/bugzilla2github_stripped.csv
parent5c7f63fa7a88cf2cb9b6837eb2797268c5843030 (diff)
Hardcode next_up and next_down instead of relying on nextafter.
Unfortunately, compilers are currently unable to optimize the nextafter function, even in the degenerate case where the second argument is explicitly infinite. So, this commit implements this case by hand. On the following testcase, this gives a 15% speedup. From Coq Require Import Int63 BinPos PrimFloat. Definition foo n := let eps := sub (next_up one) one in Pos.iter (fun x => next_down (add x eps)) two n. Time Eval vm_compute in foo 100000000. And when looking at the cost of just the allocation-free version of next_down, the speedup is 1500%. Said otherwise, the latency of next_down is now on par with the measurement noise due to cache misses and the like.
Diffstat (limited to 'dev/bugzilla2github_stripped.csv')
0 files changed, 0 insertions, 0 deletions