jwaldmann
jwaldmann
one millon: ``` benchmarked 2^20/pointwise/contiguous/fromList time 34.67 ms (33.36 ms .. 35.76 ms) 0.996 R² (0.992 R² .. 0.999 R²) mean 33.09 ms (31.78 ms .. 34.01 ms) std dev...
30 million: ``` benchmarking 2^25/pointwise/contiguous/fromList ... took 245.4 s, total 56 iterations benchmarked 2^25/pointwise/contiguous/fromList time 4.108 s (3.742 s .. 4.314 s) 0.992 R² (0.978 R² .. 0.999 R²) mean...
> I frankly don't know who actually uses `Data.Tree` Just a data point: I do, and precisely for the ASCII art. Part of an auto-grader (https://gitlab.imn.htwk-leipzig.de/autotool/all0/ ) it sometimes prints...
> splitL, splitR :: (a -> Bool) -> Seq a -> (Seq a, Seq a) https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Sequence.html#v:spanl ? > searchL, searchR :: (Int -> a -> Int -> Bool) -> Seq...
I see. So, something like https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Set-Internal.html#v:spanAntitone > Seq whose elements are in some kind of sorted order then why not use Data.Set (can you give an example where that does...
why would implementation via `split` be more efficient? It's something like ``` between lo hi = snd . M.split lo . fst . M.split hi ``` and the first `split`...
Strictness - I did not check, but yes, I thought that all balanced maps are strict in the structure. Note, my argument (too much work) also holds if only one...
I made a note of this at https://gitlab.haskell.org/ghc/ghc/-/issues/21217
See also https://github.com/haskell/containers/issues/778 . It says that implementation via split is "at most a constant factor off", which I believe for time, but not for space.
seems slower and needs more space than the current implementation (extra allocations for Maybe and Pair) crude way of measuring, in ghci ``` import Data.Tree bin n = Node ()...