Slicing isn't O(N). In the current implementation in core, slicing is O(log32n) i believe. In the next version of Elm, slicing is O(log32n) when start = 0; I'm uncertain what the big-o notation is once start > 0 though.
fredag 17. november 2017 09.25.22 UTC+1 skrev Francisco Ramos følgende: > > Hi there, > > Was wondering how I can map over an array with a start and end indexes. I > know I could slice the array and then map, but performance is a concern and > slicing is O(N) where N = end - start, plus the actual mapping, another > O(N). > > Maybe there is another way where I just loop once over the array? > > Thanks a lot, > Fran > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
