{"push_id":841921995,"size":1,"distinct_size":1,"ref":"refs/heads/hashalloc","head":"23957eac2e15e831e9d4cfd9f237f5fe9fb3bc30","before":"65cb275a857bf35912c473f23eeb37b0db3bdfb9","commits":[{"sha":"23957eac2e15e831e9d4cfd9f237f5fe9fb3bc30","author":{"email":"6c68cabc7124e43c9b4d50f86510600f69e74c99@nym.se","name":"Jakob Borg"},"message":"Reduce allocations in HashFile\n\nBy using copyBuffer we avoid a buffer allocation for each block we hash,\nand by allocating space for the hashes up front we get one large backing\narray instead of a small one for each block. For a 17 MiB file this\nmakes quite a difference in the amount of memory allocated:\n\n\tbenchmark               old ns/op     new ns/op     delta\n\tBenchmarkHashFile-8     102045110     100459158     -1.55%\n\n\tbenchmark               old allocs     new allocs     delta\n\tBenchmarkHashFile-8     415            144            -65.30%\n\n\tbenchmark               old bytes     new bytes     delta\n\tBenchmarkHashFile-8     4504296       48104         -98.93%","distinct":true,"url":"https://api.github.com/repos/calmh/syncthing/commits/23957eac2e15e831e9d4cfd9f237f5fe9fb3bc30"}]}