One more followup to N f32's <-> Rc pointers <-> *mut f32 for blas/C
I’m writing a mini-Tensor library of sorts. As a result, there a common operation is to create a N-1 dimension tensor from a N dimension tensor by “pinning” one dimension, and iterating over all remaining dimensions.
Now, my question is:
dst[i].set( src[j].get() ); // assume both are Vec<Cell<f32>>
as cheap as
dst[i] = src[j] ;// assume both are Vec<f32>
Or is there some additional cost due to .get .set that is NOT compiled away?
If Cell .get, .set are ‘zero cost’ abstractions, what can I read to “prove to myself” that Cell .get.set are indeed “zero cost” ?