map over an ArrayPartition is slower than mapping over the inner partitions and reconstructing an ArrayPartition. I typically use something like:
partition_map(f, array::ArrayPartition) = ArrayPartition(map(partition -> map(f, partition), array.x))
partition_map(f, array) = map(f, array)
Would it be worth making this the default for map over a single ArrayPartition?
mapover anArrayPartitionis slower than mapping over the inner partitions and reconstructing anArrayPartition. I typically use something like:Would it be worth making this the default for
mapover a singleArrayPartition?