hash-org / hashc

The Hash programming language compiler :zap:
https://hash-org.github.io/hashc/
MIT License
25 stars 2 forks source link

Function inlining pass #1030

Open feds01 opened 11 months ago

feds01 commented 11 months ago

Another powerful optimisation pass which any serious compiler will perform.

The function inlining pass will attempt to small functions into other functions to avoid the "cost" of a call.

There is no definitive answer to when a function should be inlined in or not, it often depends on a number of heuristics and cost-optimisation approaches.