Closed
Description
Usually, the compiler makes its own assessment whether a function should be inlined at call-sites. However one could force it with an @inline
decoration.
For some reason, adding the decoration to already-to-be-inlined functions sometimes lead to surprisingly different compilation output with two notable variations:
- Increased number of local variables at call-site (although the callee is inlined anyway).
- Inverted loop conditions, i.e.,
for (let i: u32 = 0; i < c; i++)
the compiler puts the variables in reverse order and emitsi32.gt_u
.
Although these variations are quite minor, they sometimes decrease runtime performance and make debugging more difficult.
Metadata
Metadata
Assignees
Labels
No labels