Coffeehouse Post

Single Post Permalink

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

    , Bass wrote

    The situations where you can know that when a function is called from somewhere it will always be passed values of a certain type are the same in static and dynamic languages (that's how type inference works).

    Type inference can sometimes tell what type a parameter will be (if you can, you get fast speeds. If you can't you have to do a slow runtime check).

    Static types mean that you can always tell that a parameter will be, meaning that you never need to do a slow runtime check to ask what a parameter is to decide whether + means ADD or FADD or call variant_Add.