Depends on how much memory you have and how much token pointer is in memory.
The 360 ββMB common index can be quickly found on any old computer. The 360 ββGB index will take a little longer ...;)
As an example, I ran the old 2 GB index and searched for "* e".
On a box with 8 GB, he returned 500 thousand hits in less than 5 seconds. I tried the same index on a box with 1 GB of memory, and it took about 20 seconds.
To illustrate further, here is some general C # code that basically does a search like "** E *" out of 10 million random 3 phrases.
static string substring = "E"; private static Random random = new Random((int)DateTime.Now.Ticks);//thanks to McAden private static string RandomString(int size) { StringBuilder builder = new StringBuilder(); char ch; for (int i = 0; i < size; i++) { ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))); builder.Append(ch); } return builder.ToString(); } static void FindSubStringInPhrases() { List<string> index = new List<string>(); for (int i = 0; i < 10000000; i++) { index.Add(RandomString(5) + " " + RandomString(5) + " " + RandomString(5)); } var matches = index.FindAll(SubstringPredicate); } static bool SubstringPredicate(string item) { if (item.Contains(substring)) return true; else return false; }
After 10 million phases have been loaded into the list, it only takes a second for βvar matches = index.FindAll (SubstringPredicate)β; to return more than 4 million views.
The fact is that memory is fast. Once things can no longer fit into memory, and you should start swapping to disk when you see how you get into performance.
source share