Actually jit languages can outperform compiled languages by using runtime analysis to perform tiered compilation and profile guided optimisations.
C# has made some great strides in this regard.
All the normal optimisations are applied when it is compiled to byte code. Like loop unrolling etc.
Then once it detects the hot paths during execution it can apply even more based on how it is called. It can also do optimisations that aren’t possible at initial compile time.
Dynamic PGO it’s called. It’s a really interesting topic.
That does constrain the optimizations to a profile determined prior to the end user. Which is hopefully the same but might not be. Shared code between applications also is a challenge.
Actually jit languages can outperform compiled languages by using runtime analysis to perform tiered compilation and profile guided optimisations.
C# has made some great strides in this regard.
All the normal optimisations are applied when it is compiled to byte code. Like loop unrolling etc.
Then once it detects the hot paths during execution it can apply even more based on how it is called. It can also do optimisations that aren’t possible at initial compile time.
Dynamic PGO it’s called. It’s a really interesting topic.
You can do PGO with GCC, though it takes extra steps of course
That does constrain the optimizations to a profile determined prior to the end user. Which is hopefully the same but might not be. Shared code between applications also is a challenge.