Efficient conversion between boxed and unrelated vectors

What is the recommended conversion method between Data.Vector.Unboxed and Data.Vector . In particular, I need to map a function over a vector that converts the type of an unboxable element, such as Int , to a non-unboxable, such as Text . I assume that going through an intermediate list will not be very effective.

+7
source share
1 answer

You can use the convert function from Data.Vector.Generic to change the types of vectors, and then map to convert each element.

+11
source

All Articles