You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be able to be sped up significantly by caching the log entry index when it's found the closest one. Using Rust's slices, you can stop checking any position before the most recently found location. Essentially:
find the min once and cache its index
on subsequent searches, find the min of the slice [idx..], which equates to the remainder of the vector
The min function probably should be done manually, in order, starting with idx=0 so that local minimums are allowed. This will account for things like looping and getting stuck. Also, since the closest position will also be the closest to the front of the vector, this should be incredibly fast, as it won't be necessary to iterate over the entire vector every time.
The text was updated successfully, but these errors were encountered: