Narks
Vastly intelligent whale-like being from the stars
- Reaction score
- 90
I've got, say, a thousand strings. There are no duplicate strings.
I've got two functions.
Function A:
Search all the strings for an exact match to the string entered in chat, and return the result.
Function B:
Search all the strings for a partial match to the string entered in chat, and copy the results to an array.
If I use an array, I suspect:
- it will be very slow
- I will be very close or will be hitting the operations limit (which I can try to avoid by using .execute, which I will be doing, but I'd rather not use up so much processing power)
But if I use a hashtable:
- I cannot retrieve the key of a hashtable for partial matching
Any ideas as to what I should do in this scenario?
I've got two functions.
Function A:
Search all the strings for an exact match to the string entered in chat, and return the result.
Function B:
Search all the strings for a partial match to the string entered in chat, and copy the results to an array.
If I use an array, I suspect:
- it will be very slow
- I will be very close or will be hitting the operations limit (which I can try to avoid by using .execute, which I will be doing, but I'd rather not use up so much processing power)
But if I use a hashtable:
- I cannot retrieve the key of a hashtable for partial matching
Any ideas as to what I should do in this scenario?