Browse by Tags

Ok so I have a rather slow algorithm that I would really love some advice to speed up! It may repeat many times over different large data strings. The string 'data' contains "variables" (denoted by ${myVarName} in the data) that must be replaced with the value of the corresponding (either by id or name) element on the html page. ...

Task:
I have a dictionary of 4,000 elements. Each element is a regular expression. I need to know which elements from the dictionary can be found in a document. This process is repeated frequently on many different documents.
Current Solution:
Enumerate through the dictionary and do a regex search for each individual dictionary ...