This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve DateTime{Offset} "r" and "o" formatting performance
Two main changes: 1. Rewrote the formatting to use span, only to then discover that we already had almost exactly the same implementation in Utf8Formatter. As that one had some extra optimizations around JIT behaviors, I ported that over instead. 2. Avoided [ThreadStatic] lookups unless necessary. ToString/TryFormat for "o"/"O" improve by ~2.5x. ToString/TryFormat for "r"/"R" improve by ~3x.
- Loading branch information
1 parent
e2ff69f
commit e10f1b4
Showing
3 changed files
with
244 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.