Sebastian said:
We're talking about normal javascript which is partitially precompiled
on Mozilla, Opera and Konqueror/Safari.
You mean partitially precompiled /sources/ served to the browser a la
..class bytecode in Java? There is not such in JavaScript (though exists
something similar in JScript.Net).
If you mean the source /parsing/ rules after the script text is served
to the browser, then its described in ECMA-262 specs:- but It has no
effect on performance at runtime.
If you mean that say in
for (var i=0; i<10000; ++i) {
// do a lot of stuff
}
the engine doesn't parse all lines 10000 times but keep it as compiled
binary in the execution stack - then you are finally right, and it
/may/ be called "JITed" as for any other language though - as no one
modern engine acts as a Babbage's machine
Yet using very specific terms of one programming language in
application to another completely different language - without any
indication what you are just making an analogy - is not correct.
Besides being very confusing for readers, it also implies to yourselve
wrong expectations of the results.
Actually the most popular crypto algorithms are rather simple by
themselves, so a relevant sub can be written on any available language.
But they are very math intensive, so an anyhow good security will be
dead slow on any language: JavaScript, Java or C++. It must be an
assembly optimized code to get a good performance. One time Bouncy
Castle for **Java** was known to be good <
http://www.bouncycastle.org/>
Still a quick enough **JavaScript** program could be written, but its
cryptography "strength" will have only educational value.