Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How does @inline actually work?

$
0
0

Right. The flag appears to be for something else.

From what I can recall it is not really meant to work across modules. Did you read Inlining Constants | ReScript Language Manual ? Especially the last part (Tips & Tricks)?

This is not an optimization. This is an edge-case feature for folks who absolutely need particular values inlined for a JavaScript post-processing step, like conditional compilation. Beside the difference in code that the conditional compilation might end up outputting, there’s no performance difference between inlining and not inlining simple values in the eyes of a JavaScript engine.


Viewing all articles
Browse latest Browse all 2592

Trending Articles