##
splice(@$ra,$index,0,$elem);
####
cmpthese (5000, {
radiantmatrix => sub { my $array = [1..1000]; insert_array_elem1($array,1,$_) for 50..100 },
use_splice => sub { my $array = [1..1000]; insert_array_elem2($array,1,$_) for 50..100 },
});
####
Rate radiantmatrix use_splice
radiantmatrix 467/s -- -83%
use_splice 2762/s 492% --