Inline direct calls to transmute in the frontend #15396
Labels
A-codegen
Area: Code generation
I-compiletime
Issue: Problems and improvements with respect to compile times.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
When we see a direct call to
mem::transmute
, 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 often avoid onememcpy
, because we can simply bitcast the destination instead of bitcasting the source.The text was updated successfully, but these errors were encountered: