Skip to content

Commit

Permalink
perf: optimise space
Browse files Browse the repository at this point in the history
  • Loading branch information
kazhala committed Oct 12, 2021
1 parent 3473203 commit 0882ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pfzy/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@ async def fuzzy_match(
results = heapq.merge(*batches, key=lambda x: x["score"], reverse=True)
choices = []
for candidate in results:
choices.append({**candidate["haystack"], "indices": candidate["indices"]})
candidate["haystack"]["indices"] = candidate["indices"]
choices.append(candidate["haystack"])
return choices

0 comments on commit 0882ffa

Please sign in to comment.