unsafe workaround for slow subarrays