Coffeehouse Post

Single Post Permalink

View Thread: is managed code faster than native?
  • User profile image

    , Bass wrote


    Explain when it isn't accurate. 

    Because type inference between functions is a whole program optimisation, and is expensive and infeasible for large programs. Inlining functions can also only be done for certain classes of functions - namely small ones with no recursion.

    Ultimately your solution for making a program written without types faster is to change it into a program written with types by type inference. Surely even you can see that it's faster (and more likely to find bugs) if you ask the programmer what the type should be in rather than trying (and often failing) to infer the type by second guessing the programmer.