Age | Commit message (Collapse) | Author | Files | Lines |
|
-0.0" (#22300)
|
|
* Avoid allocations in Utf8Formatter.TryFormat(float/double, ...)
Currently every call to Utf8Formatter.TryFormat for a float or a double allocates two strings, one for the format string and one for the resulting number. This avoids those in the common case where we can use float/double.TryFormat and format directly into a stack buffer. Also removes some unsafe code; the performance of StandardFormat.ToString isn't currently worth the extra nanoseconds gained by using unsafe code.
* Delete assert
There's a test that uses unsafe code to cause this to fail and validate that no exception is thrown.
|
|
This is the first step to moving OperationStatus from corefx into coreclr. It'll be used by the transcoding APIs which live in System.Private.CoreLib.
|
|
Fix lots of malformed XML comments
|
|
These are causing errors in the source.dot.net build. Turning on DocumentationFile and suppressing 1591, 1573, and 0419, Corelib builds clean after these changes.
|
|
Implement 64-bit-only hardware intrinsic
|
|
|
|
|
|
(#21233)
|
|
parsing logic (#21036)
* Fixing the double/single parser to return negative zero for `-0`
* Updating the Utf8Parser to allow exponents of arbitrary length
* Updating the double/single parser to support case-insensitive and signed infinity/nan
* Ensure TryParseAsSpecialFloatingPoint handles the case where we have an empty source
* Fixing the number parser to allow `-0` for decimal and to not parse '++infini'
|
|
|
|
* Moving the Utf8Formatter and Utf8Parser into S.P.Corelib
* Doing some minimal cleanup to lineup types and get the Utf8Parser/Utf8Formatter building
* Updating the Utf8 Float Parser to have different buffers for Single vs Double
* Fixing the Utf8Parser to track trailing zero digits and to properly mark the end of the buffer
* Fixing a couple of issues in Utf8Parser.Number
|
|
The trim method had the wrong logic to get the relevant bucket size, resulting in InvalidOutOfRangeException exceptiosn being thrown and eaten on the finalizer thread.
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
With this change, the JIT will recognize a call to BinaryPrimitives.ReverseEndianness and will emit a bswap instruction.
This logic is currently only hooked up for x86 and x64; ARM still uses fallback logic.
If the JIT can't emit a bswap instruction (for example, trying to emit a 64-bit bswap in a 32-bit process), it will fall back to a software implementation, so the APIs will work across all architectures.
|
|
|
|
* Optimize CountHexDigits using Lzcnt
* shift bits instead
* use Lzcnt only on 64 bit
* Optimize Buffer.Utilities.SelectBucketIndex()
* #if HAS_INTRINSICS
* remove HAS_INTRINSICS
* remove HAS_INTRINSICS
|
|
|
|
* Improve throughput of TimeSpan.ToString/TryFormat with "g"/"G"
TimeSpan has three standard formats: "c", "g", and "G". Yesterday I updated its implementation with throughput improvements for "c" (the default) based on porting the design from Utf8Formatter; this PR does so for "g"/"G".
Initially I wasn't going to handle "g"/"G" as they factor in culture (Utf8Formatter doesn't), but even with accessing the current culture there are still significant wins to be had. I was also going to keep the "c" and "g"/"G" implementations separate, to avoid bogging down the default "c" formatting with additional conditions needed to support "g"/"G", but the overhead incurred for that turns out to be minimal enough that it's worth keeping one implementation rather than two mostly-similar ones... the impact on "c" is mostly within noise.
This PR makes a significant throughput improvement for "g"/"G" formatting. It also removes several unnecessary allocations, such that TryFormat with "g"/"G" is now allocation-free (and ToString just allocates the asked-for string).
* Address PR feedback
|
|
* Fix IDE0034 C# expression can be simplified (use of default)
* Remove unnecessary using statements
* IDE0012 C# Name can be simplified. String -> string
* IDE0041 C# Null check can be simplified
* Fix code formatting (limited to Span/System.Memory files).
* Address PR feedback - IDE0012 Name can be simplified (String -> string)
* Add back the necessary using statements and fix typo
* Fix comment typo and add necessary using statements
|
|
* diff from just renaming folder mscorlib to System.Private.CoreLib
* Updating build.proj to reflect name change
Fixes: #17905
|