Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
msbarnett
on Feb 20, 2017
|
parent
|
context
|
favorite
| on:
How copying an int made my code 11 times faster
Am I reading it right? It looks to me like rustc didn't mark the immutable borrow as readonly, so LLVM went ahead and assumed print could mutate it.
dbaupp
on Feb 20, 2017
[–]
I'm not 100% sure, but I believe LLVM doesn't have a way to understand the (im)mutability of pointers rewritten into memory, like the borrow is here.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: