From c6d7a3adece6e5d2502e4564407f516d1a3fbb33 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 28 Oct 2016 14:28:02 +0200 Subject: [PATCH] [linker] Use ordinal instead of invariant comparison. (#1025) Profiled when running the partial static registrar on Xamarin.iOS.dll Duration before: 1,60s Duration after: 1,41s Difference: -0,19s = -11,9% Memory usage before: 541.887.736 bytes Memory usage after: 509.111.944 bytes Difference: -32.775.792 bytes = -6,0% Method calls before: 86.720.379 Method calls after: 63.073.602 Difference: -23.646.777 = -27,3% --- tools/mtouch/AssemblyResolver.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mtouch/AssemblyResolver.cs b/tools/mtouch/AssemblyResolver.cs index 2367ca706f..98d52e8457 100644 --- a/tools/mtouch/AssemblyResolver.cs +++ b/tools/mtouch/AssemblyResolver.cs @@ -48,7 +48,7 @@ namespace MonoTouch.Tuner { public MonoTouchResolver () { - cache = new Dictionary (StringComparer.InvariantCultureIgnoreCase); + cache = new Dictionary (StringComparer.OrdinalIgnoreCase); } ReaderParameters CreateParameters (string path) @@ -61,7 +61,7 @@ namespace MonoTouch.Tuner { public IDictionary ToResolverCache () { - var resolver_cache = new Hashtable (StringComparer.InvariantCultureIgnoreCase); + var resolver_cache = new Hashtable (StringComparer.OrdinalIgnoreCase); foreach (var pair in cache) resolver_cache.Add (pair.Key, pair.Value);