Do guarantees provided by the type systems enable better performance optimizations by the *modern* compilers? I found a [20+ year article](https://xavierleroy.org/publi/intro-tic98.pdf) suggesting that it would. Also, intuitively speaking, knowing more about the code in advance should also be useful. However, a friend claims that modern JIT compilers make such claim irrelevant. In his words:

> 
> This is a paper from 1998. Today, JIT compilers eliminate many of the cases mentioned in the paper for dynamically typed systems. For example, JavaScript uses integer arithmetic for integer types, without knowing the type declarations in advance. I doubt if predeclared types are as significant for performance today as they were two decades ago. Native instruction set and memory management mechanisms seem to have much more influence on performance to me.
> 
> 
> 

What's the situation in modern compilers?