{"push_id":1359914151,"size":1,"distinct_size":1,"ref":"refs/heads/needless-copies","head":"1f1a60e70cc2e6b67cf244f7cd3510a1bb7e72a2","before":"c19a125149f96db793a5329ce864fe7f2eb353c5","commits":[{"sha":"1f1a60e70cc2e6b67cf244f7cd3510a1bb7e72a2","author":{"name":"Ben Gamari","email":"9c85637c38b80821c7bd8a03bde7b59da81ab77d@smart-cactus.org"},"message":"Avoid copying if possible in `concat`\n\nThe `binary` package revealed a rather obvious missing optimization here\nwhen it forced extraneous copies with the evaluation of `concat [a,b]`\nwhere `a` is empty and `b` is large.\n\nHere we rework `Data.ByteString.concat` and `Data.ByteString.Lazy.concat`\nto more aggressively avoid unnecessary copies in the face of\nconcatentations of lists with empty chunks. This rework has the nice\nadvantage of avoiding allocation during computation of the final buffer\nlength in the case where a copy is necessary (whereas previously\n`checkedSum` would fail to fuse and therefore require allocation for its\nlist argument).","distinct":true,"url":"https://api.github.com/repos/bgamari/bytestring/commits/1f1a60e70cc2e6b67cf244f7cd3510a1bb7e72a2"}]}
{"actor":{"display_login":"bgamari"}}