DEV Community

Discussion on: The case for replacing Array.slice

Collapse
 
robinheghan profile image
Robin Heggelund Hansen

Fun fact: Both in 0.18 and the upcomming 0.19, slice is actually implemented internally as array |> sliceLeft from |> sliceRight to.

So no, no performance change. In fact, since drop and take wouldn't need to convert negative indices to positive indices, it would likely result in a minor performance boost.