Add insertAt benchmark
authorDavid Feuer <David.Feuer@gmail.com>
Mon, 30 May 2016 04:46:58 +0000 (00:46 -0400)
committerDavid Feuer <David.Feuer@gmail.com>
Mon, 30 May 2016 04:52:16 +0000 (00:52 -0400)
commita3f39212419df9e74b4a0f489a01b55a00db664e
treeb435cb48ad14c39b8f4958e4f1cea7c431137d0f
parent1dbe8b3af0cbe08eb8d22b34dc9db4b09f09cece
Add insertAt benchmark

Make `insertAt` rebuild the tree eagerly, which saves a little
time and avoids the possibility that large thunks will build
up at the root of the tree when multiple elements are inserted.

For long sequences `insertAt` is around 4.6 times as fast as
splitting the sequence and re-forming it around the new element.
Data/Sequence.hs
benchmarks/Sequence.hs