Skip to content

Instantly share code, notes, and snippets.

View TIHan's full-sized avatar

Will Smith TIHan

  • Olympia, WA
View GitHub Profile
class Benchmark
{
[Test]
public void RunTypes()
{
var cache = typeof(string).Assembly.GetTypes().ToDictionary(x => x, x => x.Name.Length);
var sum = 0;
var sw = Stopwatch.StartNew();
var n = 1000000;
for (var i = 0; i < n; i++)