mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Optimize high_prec_dec__round_just_enough
name old time/op new time/op delta wuffs_strconv_render_number_f64_just_enough_fractions/clang5 56.4µs ± 1% 56.3µs ± 1% ~ (p=1.000 n=5+5) wuffs_strconv_render_number_f64_just_enough_small_integers/clang5 4.12µs ± 2% 1.00µs ± 1% -75.65% (p=0.008 n=5+5) wuffs_strconv_render_number_f64_just_enough_fractions/gcc7 54.3µs ± 0% 54.2µs ± 0% ~ (p=0.151 n=5+5) wuffs_strconv_render_number_f64_just_enough_small_integers/gcc7 4.16µs ± 0% 1.01µs ± 0% -75.77% (p=0.000 n=4+5)
This commit is contained in:
1 parent
58678cb342
commit
19b3ce24a3
5 files changed
+35
-11
No files matched your search
@@ -659,6 +659,8 @@ test_wuffs_strconv_parse_number_f64() {
|
||||
{.want = 0x4330000000000001, .str = "4503599627370497"},
|
||||
{.want = 0x4330000000000002, .str = "4503599627370497.5"},
|
||||
{.want = 0x4330000000000002, .str = "4503599627370498"},
|
||||
{.want = 0x433FFFFFFFFFFFFE, .str = "9007199254740990"},
|
||||
{.want = 0x433FFFFFFFFFFFFF, .str = "9.007199254740991e+15"},
|
||||
{.want = 0x4340000000000000, .str = "9007199254740992"}, // 1 << 53.
|
||||
{.want = 0x4340000000000000, .str = "9007199254740993"},
|
||||
{.want = 0x4340000000000001, .str = "9007199254740994"},
|
||||
@@ -1274,6 +1276,24 @@ test_wuffs_strconv_render_number_f64() {
|
||||
.want_3f = "4503599627370498.000",
|
||||
.want_4g = "4.504e+15",
|
||||
},
|
||||
{
|
||||
.x = 0x433FFFFFFFFFFFFE,
|
||||
.want__e = "9.00719925474099e+15",
|
||||
.want__f = "9007199254740990",
|
||||
.want_0g = "9e+15",
|
||||
.want_2e = "9.01e+15",
|
||||
.want_3f = "9007199254740990.000",
|
||||
.want_4g = "9.007e+15",
|
||||
},
|
||||
{
|
||||
.x = 0x433FFFFFFFFFFFFF,
|
||||
.want__e = "9.007199254740991e+15",
|
||||
.want__f = "9007199254740991",
|
||||
.want_0g = "9e+15",
|
||||
.want_2e = "9.01e+15",
|
||||
.want_3f = "9007199254740991.000",
|
||||
.want_4g = "9.007e+15",
|
||||
},
|
||||
{
|
||||
.x = 0x4340000000000000,
|
||||
.want__e = "9.007199254740992e+15",
|
||||
|
||||
Reference in new issue
Block a user