
17 Jul
2014
17 Jul
'14
7:12 p.m.
hi,
Is last function is something like "black box" written in C++ which perform O(1)?
This is not really about Haskell vs. C++, but about how the data structures look like in memory.
as tillmann said, it's about the data structures. Data.Sequence sounds like it fits your algorithm very well. but maybe one of the array libraries (vector, array, repa, accelerate) suits you better. there are also mutable variants that live in `ST` or `IO`, so you could translate your algorithm without any difference. good luck, tobias florek