Optim to avoid useless gsliced_array