Commit 602ebe9
Re-implemented the ecvt function. (dotnet#12894)
* Re-implemented the ecvt function.
Instead of leveraging snprintf, re-implement the ecvt function according to the paper: https://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf
Note:
1. This commit won't fix any existing bug.
2. This is a raw implementation of the paper. The performance on Linux only gain 10%. We could tune the performance further.
Fix #10651
* Resolve a cross platform header file issue.
Fix #10651
* Fixed a minor bug. Improved the performance.
Fix #10651
* Modified code according to code review feedback.
This commit fixed most of the issue found in code review. However, some of the feedback may not be involved due to either little performance improvement or need a POC.
Fix #10651
* Try to fix constexpr compile error on Windows.
Fix #10651
* Fixed a potential overflow bug in BigNum::Compare.
Fix #10651
* Improved multiply 10 operation.
Use shift and add operation to replace actual multiply operation.
Fix #10651
* Remove old _ecvt function.
Fix #10651
* Documented the reason why we do not need m+ and m-.
Fix #10651
* Changed exp > 0 to exp != 0 to remove any confusion.
exp should fall in 1 ~ 2046 for normalized value. Denormalized value has exp = 0.
Fix #10651
* Disable the _ecvt tests.
Fix #10651
* Removed _ecvt tests.
Fix #10651
* Re-implemented LogBase2.
Fix #10651
* Use DWORD and DWORD64 for _BitScanReverse and _BitScanReverse64
Fix #10651
* Fixed x86 compile issue for _BitScanReverse64
x86 does not support _BitScanReverse64 so we have to add additional shift operations to handle it.
Fix #10651
* Implemented BitScanReverse64 and BitScanReverse in pal.h
Fix #10651
* Remove the confusion comment which is unrelated to BitScanReverse.
Fix #10651
* Introduced wmemset to enhance the perf for 0.0
Fix #10651
* Improved the performance of converting 0.0.
Fix #10651
* Renamed ecvt to DoubleToNumberWorker.
Fix #10651
* Updated code according to the code review feedback.
Fix #106511 parent 13c7d39 commit 602ebe9
File tree
14 files changed
+1088
-346
lines changed- src
- classlibnative/bcltype
- pal
- inc
- src/cruntime
- tests/palsuite
- c_runtime
- _ecvt
- test1
14 files changed
+1088
-346
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments