What is the difference between taking a slice:
fn relu(xs: &mut [f64]) {
xs.iter_mut().for_each(|x| *x = x.max(0.0));
}
and taking a reference to an array
fn relu<const L: usize>(xs: &mut [f64; L]) {
xs.iter_mut().for_each(|x| *x = x.max(0.0));
}
as argument?
Does either have its uses or is one strictly better than the other?