> all dynamic languages compromise on execution speed
Not all, some of them bring a JIT compiler, or several, in the box, reducing the need to reach out to compiled languages as step zero on optimizations.
Some of them even support AOT compilation, alongside low level systems programming, like BASIC, Lisp, Scheme or Dylan.
the raku vm (moarvm) does have jit already but until the current AST work is done, it is limited in the depth of code inspection it can do to meaningfully accelerate
even with very mature jit (eg. java) it is not generally possible to outperform static compiler optimisations
On Java case, depends on which toolchain it is being tested, how many JIT levels it supports, if PGO is part of the picture, if it does JIT caching, if there is an AOT compilation available as well.
On Android/ART, multiple factors collaborate for the best AOT compilation with optimising compiler, when the device is idle, while a tiered JIT does its best, depending if PGO data was downloaded alongside the APK, or needed to be generated from scratch.
Not all, some of them bring a JIT compiler, or several, in the box, reducing the need to reach out to compiled languages as step zero on optimizations.
Some of them even support AOT compilation, alongside low level systems programming, like BASIC, Lisp, Scheme or Dylan.