W
Wojtek
Wojtek wrote :
Ok, did the changes and ran 5 identical tests for each category. I hit
7 pages with 989 lokkups. And....
HashMap - average of 3,356 nano seconds
Array Lookup - average of 2,370 nano seconds
So there is a 33% reduction in lookup time.
Of course this is only a difference of 1 micro-second
And on a 2G laptop rather than our server class machines
BUT, I could place each key during the loading process into an ArrayList,
then when done create an array from it, then run through the array and set
the index value into the LangKey. Then use that index value to directly
access the array to get the value.
Ok, did the changes and ran 5 identical tests for each category. I hit
7 pages with 989 lokkups. And....
HashMap - average of 3,356 nano seconds
Array Lookup - average of 2,370 nano seconds
So there is a 33% reduction in lookup time.
Of course this is only a difference of 1 micro-second
And on a 2G laptop rather than our server class machines