Skip to content
Permalink
Browse files

Add StrTrie Load benchmark

  • Loading branch information...
bobbymcr committed Apr 3, 2019
1 parent ce9d7a4 commit 64f7a5fbe2db4553c46c34199e18fab5a561f03f
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Words.Benchmark/LoadTrie.cs
@@ -49,12 +49,19 @@ public void Setup()
}

[Benchmark]
public int FromFile()
public int String()
{
StringTrie trie = StringTrie.Load(File.OpenRead(FileName(this.Pct)));
return trie.Count;
}

[Benchmark]
public int Str()
{
StrTrie trie = StrTrie.Load(File.OpenRead(FileName(this.Pct)));
return trie.Count;
}

private static string FileName(int pct) => $"words_{pct}.txt";
}
}

0 comments on commit 64f7a5f

Please sign in to comment.
You can’t perform that action at this time.