I have a lookup like ths:
Lookup<String, pages> plsBase = (Lookup<String, pages>)(Query<pages>($@"Select ...").ToLookup(s => s.ip, o => o));
It is very fast when I access it by key, but the problem is that I need to access it with StartsWith(). When I use StartsWith() like below, the performance is comparable to a regular List
var pls = plsBase.Where(x => (x.Key.StartsWith(classBIp, StringComparison.Ordinal))).SelectMany(x => x).ToList();
The question is what can be done to improve the performance when using StartsWith()?