mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
Changes Emoji dictionary to OrdinalIgnoreCase for performance
This code is ran on startup, and instantiating a new InvariantCultureIgnoreCase was taking up 11ms, which was half the time in AOT.
This commit is contained in:
parent
aa9e5c48c6
commit
69689d2ba1
@ -18,7 +18,7 @@ namespace Spectre.Console
|
||||
public static partial class Emoji
|
||||
{
|
||||
private static readonly Dictionary<string, string> _emojis
|
||||
= new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
|
||||
= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{{~ for emoji in emojis ~}}
|
||||
{ "{{ emoji.identifier }}", Emoji.Known.{{ emoji.name }} },
|
||||
|
@ -18,7 +18,7 @@ namespace Spectre.Console
|
||||
public static partial class Emoji
|
||||
{
|
||||
private static readonly Dictionary<string, string> _emojis
|
||||
= new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
|
||||
= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{ "abacus", Emoji.Known.Abacus },
|
||||
{ "ab_button_blood_type", Emoji.Known.AbButtonBloodType },
|
||||
|
Loading…
x
Reference in New Issue
Block a user