Unless you are operating at FAANG scale or are in HFT I really struggle to see how O(n) would ever be a problem for you here.