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 commit adds a LRU cache to the history_idx function, caching the indexes in which a commit is from another in the history.
Before:
BenchmarkHistoryIdx/history_idx-4 2000 789749 ns/op 415896 B/op 1519 allocs/op
PASS
ok github.com/src-d/gitquery/internal/function 2.189s
After:
BenchmarkHistoryIdx/history_idx-4 1000000 1063 ns/op 256 B/op 9 allocs/op
PASS
ok github.com/src-d/gitquery/internal/function 1.607s
Signed-off-by: Miguel Molina <[email protected]>
0 commit comments