mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
floatconv: optimize parse_number_f64 fallback
The time taken running script/manual-test-parse-number-f64.cc on the parse-number-fxx-test-data suite falls from 3.565s to 2.491s (a 1.43x ratio; the inverse is 0.70 = 100% - 30%). Fixes #113
This commit is contained in:
1 parent
05f0172b93
commit
00d5e35865
5 files changed
+78
-24
No files matched your search
@@ -1026,6 +1026,7 @@ test_wuffs_strconv_parse_number_f64_regular() {
|
||||
{.want = 0x46293E5939A08CEA, .str = "1e30"},
|
||||
{.want = 0x54B249AD2594C37D, .str = "+1E+100"},
|
||||
{.want = 0x54B249AD2594C37D, .str = "+_1_E_+_1_0_0_"},
|
||||
{.want = 0x54B2987670ADB613, .str = "1.0168286519992372611942638e+100"},
|
||||
{.want = 0x7BBA44DF832B8D46, .str = "1e+288"},
|
||||
{.want = 0x7BF06B0BB1FB384C, .str = "1e+289"},
|
||||
{.want = 0x7C2485CE9E7A065F, .str = "1e+290"},
|
||||
@@ -1943,6 +1944,19 @@ test_wuffs_strconv_render_number_f64() {
|
||||
"4.000",
|
||||
.want_4g = "1e+100",
|
||||
},
|
||||
{
|
||||
.x = 0x54B2987670ADB613,
|
||||
.want__e = "1.0168286519992373e+100",
|
||||
.want__f = "10168286519992373000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000000000000000000000"
|
||||
"0",
|
||||
.want_0g = "1e+100",
|
||||
.want_2e = "1.02e+100",
|
||||
.want_3f = "10168286519992372611942638135241625267907715220891"
|
||||
"31363562982164291689352904657807934098133246961254"
|
||||
"4.000",
|
||||
.want_4g = "1.017e+100",
|
||||
},
|
||||
{
|
||||
.x = 0x7BBA44DF832B8D46,
|
||||
.want__e = "1e+288",
|
||||
|
||||
Reference in new issue
Block a user