Sorry, I missed that
Ts
is a
Vec
, so presumably the size is not a problem. Iterating over 150M items will probably take some time -- is this
definitely a problem with
HashMap
, or are you just looking for general performance tips / code review? From my point of view (not having access to any of your data or perf metrics), it could be that your code is already optimal and it takes a while because your problem is just really hard to solve (not saying I believe that, just that the question doesn't contain enough detail to rule it out). —
trentcl 35 secs ago