Closed GrantM11235 closed 2 years ago
r? @therealprof
(rust-highfive has picked a reviewer for you, use r? to override)
I'm not convinced the _word
variants are useful.
write
with a slice with len=1
the compiler can inline write
and then simplify all the code baking in the assumption that len=1
, for example eliminating the loop. This would give final compiled code similar to what write_word
would've.This will also allow us to add new methods in the future with default implementations as a non-breaking change.
Why is that not the case already, with the current slice-based methods?
I share @Dirbaio's analysis. I would rather not increase the API surface if there is no very good reason for it. Could you elaborate what that would be?
As discussed in the meeting, I find the arguments against these methods to be convincing.
read_word
,write_word
, andtransfer_word
methods.This will also allow us to add new methods in the future with default implementations as a non-breaking change.