in reply to Re^8: Run Perl 5 in the Browser!
in thread Run Perl 5 in the Browser!
A scalar in Perl is a container which can be internally an integer or a float, a string, a ref, an object ... etc.
Very similar in JS.
Each time you have an operation on two dynamic data types, the VM needs to find out how to combine the cases for the two types.
But if in the dynamic process you found out that the variables involved "always" (or mostly) have the same type, you can JIT compile to optimized code.
In other words: The JIT compiler can treat the code as if the variables where statically typed.
see https://hacks.mozilla.org/2017/02/a-crash-course-in-just-in-time-jit-compilers/ for a nice explanation.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
---|