For instance, changing the parameter to "string[]" and then calling AnalyzeArray on the following array
results in the following
Also note: if I disabled the output (print is slow) and just called AnalyzeArray() 1000 times with teh above data it only took 19 millisecs. So, it only took about 2 nanoseconds per iteration. Granted, I'm sure it's receiving some kind of caching "bonus" working on the same data with each call but still, that's fast.
Global testarray:String[] = New String[9] testarray[0] = "Woot" testarray[1] = "Toot" testarray[2] = "Woot" testarray[3] = "Toot" testarray[4] = "Hola" testarray[5] = "blah" testarray[6] = "Testing" testarray[7] = "blah" testarray[8] = "blah"
results in the following
Number:blah Count: 3 Number:Woot Count: 2 Number:Toot Count: 2 Number:Testing Count: 1 Number:Hola Count: 1
Also note: if I disabled the output (print is slow) and just called AnalyzeArray() 1000 times with teh above data it only took 19 millisecs. So, it only took about 2 nanoseconds per iteration. Granted, I'm sure it's receiving some kind of caching "bonus" working on the same data with each call but still, that's fast.