sped up by reusing slices
created a benchmark for inversions on inverse array of size 1<<10