When we see a direct call to mem::transmute_copy, we should just inline it in the frontend. This has two important benefits, one obvious and one not-so-obvious: (1) it reduces compilation time; (2) it can sometimes avoid one memcpy by translating the destination in place if the argument is an rvalue.
When we see a direct call to
mem::transmute_copy, we should just inline it in the frontend. This has two important benefits, one obvious and one not-so-obvious: (1) it reduces compilation time; (2) it can sometimes avoid onememcpyby translating the destination in place if the argument is an rvalue.