I have a list of starting positions with ~ 280,000 items. Fully covers about 73 million positions.
For performance reasons, I have already decomposed them into parts in a dictionary (by the coefficient of the subset), which, in turn, contains a list of tuples (beginning, end).
Finally, I get a list of positions that I want to check if they are located in regions stretched to the beginning and end.
posit = (start,end)
dict[subset].append(posit)
for position in dict[subset]:
if posit[0] < varpos < posit[1]:
These searches currently take a lot of time. But due to memory reasons, I also do not want to create a faster set containing all the positions between start and stop.
Do you have any pointers to creating a quick start structure, end position or better search strategy?
source
share