@BRIAN_____ What's the difference in the code? Is it not able to remove bounds checks, or is it something else?
-
-
-
@jimblandy In my code, the first gets compiled into a loop with a bounds check in each iteration. The second gets compiled into memset. -
@BRIAN_____ One of the motivations for the slice iterators was to encourage the omission of bounds checks, so perhaps not too surprising. -
@jimblandy Surprising b/c: 1. buf is a fixed-sized array [u8; 64]. 2. Even if it weren't fixed borrow checker ensures length doesn't change. -
@brian_____@jimblandy Probably because of lack of alias information provided to LLVM at the moment. -
@pcwalton Interesting. Mightn't Rust be able to provide better alias information to LLVM than a C or C++ front end could?@BRIAN_____ -
@jimblandy@brian_____ Yeah, in time. Probably want MIR to land first
End of conversation
New conversation -
-
-
@BRIAN_____ For bytes, try `buf.set_memory(z)`?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.