diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2019-12-27 15:50:56 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2019-12-28 14:13:44 -0300 |
| commit | 250a636217977ece9bbfcf21e5af7600ee57b5c5 (patch) | |
| tree | de2020b9c4619cac47dca2d9c6277118caa68064 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | bd93b7718efc4267e1106abb42b19c84ab0d5a86 (diff) | |
| download | rust-250a636217977ece9bbfcf21e5af7600ee57b5c5.tar.gz rust-250a636217977ece9bbfcf21e5af7600ee57b5c5.zip | |
Avoid copying some undef memory in MIR
During MIR interpretation it may happen that a place containing uninitialized bytes is copied. This would read the current representation of these bytes and write it to the destination even though they must, by definition, not matter to the execution. This elides that representation change when no bytes are defined in such a copy, saving some cpu cycles. In such a case, the memory of the target allocation is not touched at all which also means that sometimes no physical page backing the memory allocation of the representation needs to be provided by the OS at all, reducing memory pressure on the system.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
