get_score() called Utc::now() inside calculate_frecency() for every item in the search loop. Added get_score_at() that accepts a pre-sampled timestamp. Eliminates hundreds of unnecessary clock_gettime syscalls per keystroke.
get_score() called Utc::now() inside calculate_frecency() for every item in the search loop. Added get_score_at() that accepts a pre-sampled timestamp. Eliminates hundreds of unnecessary clock_gettime syscalls per keystroke.