Skip to content

Changes Emoji dictionary to OrdinalIgnoreCase for performance#1691

Merged
patriksvensson merged 1 commit intospectreconsole:mainfrom
phil-scott-78:emoji-perf
Nov 20, 2024
Merged

Changes Emoji dictionary to OrdinalIgnoreCase for performance#1691
patriksvensson merged 1 commit intospectreconsole:mainfrom
phil-scott-78:emoji-perf

Conversation

@phil-scott-78
Copy link
Copy Markdown
Contributor

While working on the AOT stuff I was also profiling some code and ran across this taking up a huge chunk of the time spent initializing the app. Switching to OrdinalIgnoreCase actually gave a 100% boost in my TTFRE (time to first rocketship emoji) benchmark.

before

before-profiler

after-profiler

after

And fwiw, this puts Spectre.Console a few MS off of regular Console.WriteLine...
image

This code is ran on startup, and instantiating a new InvariantCultureIgnoreCase was taking up 11ms, which was half the time in AOT.
@patriksvensson patriksvensson merged commit be45494 into spectreconsole:main Nov 20, 2024
@phil-scott-78 phil-scott-78 deleted the emoji-perf branch December 14, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants