This release improves the slow path of bignum of string. The previous version used a split on
'_'followed by a concat, which allocated a bunch of intermediate strings.
Switched to PPX.
The library used polymorphic compare, rather than
Zarith.Q's compare, in a few locations. Fixed this.
Previously stable types in Bignum were defined with unstable types in the scope. Fixd this.
Update to zarith-1.4
Fixed a bug in the =Zarith= library's
These fixes first introduce tests from the base distribution, and then backport a bugfix to the handling of to_float.
Upgraded from Zarith 1.2 to 1.3.
Removed dependence on
Fixed exception raised by
Bignum.sexp_of_twhen the denominator is zero.
Bigint.randomfunction, which produces a uniformly distributed value.
Added functions to round from
Bigint.t, and to convert
Bignum.Bigintmodule, with arbitrary-precision integers based on
Zarith, which is significantly faster than the
Improved the performance of binprot deserialization by removing the allocation of an intermediate type.
Eliminated the dependence of
Re2, and reduced dependence from
Extended the rounding interface to bring it in line with int and float rounding.
Improved the performance of
Bignum's binprot had been to just binprot the decimal string representation. This is both slow to do and unnecessarily big in the majority of cases. Did something better in the majority of cases and fell back to this representation in the exceptional case.
$ ./inline_benchmarks_runner Estimated testing time 20s (2 benchmarks x 10s). Change using -quota SECS.
Name Time/Run mWd/Run Percentage bignum0.ml:Stable:Bignum binprot roundtrip compact 7.87us 490.00w 32.88% bignum0.ml:Stable:Bignum binprot roundtrip classic 23.94us 1_079.00w 100.00%