X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/9a48d2a7c7f8445c9f81ed00c47add83804a3cb9..81d020bc303e970d1eaebf302bb829dafeb6e2ce:/ralf/_posts/2017-07-14-undefined-behavior.md diff --git a/ralf/_posts/2017-07-14-undefined-behavior.md b/ralf/_posts/2017-07-14-undefined-behavior.md index 77e7315..4635668 100644 --- a/ralf/_posts/2017-07-14-undefined-behavior.md +++ b/ralf/_posts/2017-07-14-undefined-behavior.md @@ -8,7 +8,7 @@ So, finally, just one year later, this post is my take at what the purpose of th Warning: This post may contain opinions. You have been warned. -## When are optimizations legal? +## When are Optimizations Legal? Currently, we have a pretty good understanding of what the intended behavior of *safe* Rust is. That is, there is general agreement (modulo some [bugs](https://github.com/rust-lang/rust/issues/27868)) about the order in which operations are to be performed, and about what each individual operation does. @@ -37,7 +37,7 @@ After all, if there is any execution for which the assumption does *not* hold, t Now, it turns out that it is often really hard to obtain precise aliasing information. This could be the end of the game: No alias information, no way to verify our assumptions, no optimizations. -## Shifting responsibility +## Shifting Responsibility However, it turns out that compiler writers consider these optimizations important enough that they came up with an alternative solution: Instead of having the compiler verify such assumptions, they declared the programmer responsible.