public CharSequenceDictionaryBenchmarks() { _strings = Enumerable.Range(0, StrCount).Select(i => StringGenerator.GenString(StrLength)).ToArray(); _2bStrings = _strings.Select(s => CharSequence.FromValue(s)).ToArray(); foreach (string s in _strings) { _strDict[s] = 1; } foreach (CharSequence s in _2bStrings) { _2bDict[s] = 1; } _strings2 = _strings.Select(s => new string(s)).ToArray(); _2bStrings2 = _strings2.Select(s => CharSequence.FromValue(s)).ToArray(); }
public CharSequenceHashCodeBenchmarks() { _strings = Enumerable.Range(0, StrCount).Select(i => StringGenerator.GenString(StrLength)).ToArray(); _2bStrings = _strings.Select(s => CharSequence.FromValue(s)).ToArray(); }