rust/library
bors 91b61a4ad6 Auto merge of #110389 - mazong1123:add-shortcut-for-grisu3, r=Mark-Simulacrum
Add shortcut for Grisu3 algorithm.

While Grisu3 is way more faster for most numbers compare to Dragon4, the fall back to Dragon4 procedure for certain numbers could cause some performance regressions compare to use Dragon4 directly. Mitigating the regression caused by falling back is important for a largely used core library.

In Grisu3 algorithm implementation, there's a shortcut to jump out earlier when the fractional or integrals cannot meet the requirement of requested digits. This could significantly improve the performance of converting floating number to string as it falls back even without starting trying the algorithm.

The original idea is from the [.NET implementation](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Number.Grisu3.cs#L602-L615) and the code was originally added in [this PR](https://github.com/dotnet/coreclr/pull/14646#issuecomment-350942050). This shortcut has been shipped long time ago and has been proved working.

Fix #110129
2023-04-25 07:05:50 +00:00
..
alloc Revert "Report allocation errors as panics" 2023-04-25 00:08:37 +02:00
backtrace@8ad84ca5ad Bump version of object and related crates 2023-04-19 12:42:20 +08:00
core Auto merge of #110389 - mazong1123:add-shortcut-for-grisu3, r=Mark-Simulacrum 2023-04-25 07:05:50 +00:00
panic_abort Remove unnecessary raw pointer in __rust_start_panic arg 2023-03-26 16:40:18 +00:00
panic_unwind Remove unnecessary raw pointer in __rust_start_panic arg 2023-03-26 16:40:18 +00:00
portable-simd remove some unneeded imports 2023-04-12 19:27:18 +02:00
proc_macro Auto merge of #109002 - michaelvanstraten:master, r=petrochenkov 2023-04-21 10:47:27 +00:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #110782 - matthiaskrgr:revert_panic_oom, r=Amanieu 2023-04-25 06:46:50 +02:00
stdarch@b655243782 Update stdarch 2023-03-19 20:41:22 +00:00
test Rollup merge of #110154 - DaniPopes:library-typos, r=JohnTitor 2023-04-14 21:11:12 +02:00
unwind Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiser 2023-04-11 20:28:45 -07:00