···1717 let
1818 lazuli = pkgs.buildGoModule rec {
1919 name = "lazuli";
2020- version = "0.1.7";
2020+ version = "v0.2.0";
2121 src = pkgs.nix-gitignore.gitignoreSource [ "*.csv" "*.zip" "*.json" ] ./.;
2222 vendorHash = "sha256-KnWoZ5UK8eigYw5uMSsLu4DIhzkSXmVHaE51Mr6hFmA=";
2323 ldflags = [
+7-2
kway/merge.go
···3838// It combines the sources while removing duplicates within the specified tolerance.
3939// The result is sorted according to the Compare method of the items.
4040func Merge[T Mergeable[T]](sources [][]T, tolerance time.Duration) []T {
4141+ totalCap := 0
4242+ for _, s := range sources {
4343+ totalCap += len(s)
4444+ }
4545+4146 h := &mergeHeap[T]{}
4247 heap.Init(h)
4348···4853 }
4954 }
50555151- result := make([]T, 0)
5252- window := make([]T, 0)
5656+ result := make([]T, 0, totalCap)
5757+ window := make([]T, 0, 16)
53585459 // Process items from the heap
5560 for h.Len() > 0 {