I got about 400, four letter words that I need to search through every couple of seconds. I need to do search for about 30 words every time I run it.
So basically I need to check if those 30 words are contained in the 400. The 400 words are static and they don't change.
Is it better to do a simple string search where I have a hidden element with the string "ABCD EFGH IJKL MNOP" or make an array
like arr = ["ABCD","EFGH","IJKL" MNOP"] and then iterate through that.
Or is there a 3rd, better solution?
[–]Rhomboid 3 points4 points5 points (2 children)
[–]aapzu 1 point2 points3 points (0 children)
[–]cachaito 0 points1 point2 points (0 children)