reduce the memory needed while building the sparse array ordinals