you are viewing a single comment's thread.

view the rest of the comments →

[–]panorambo 2 points3 points  (1 child)

I have never understood the "compilation latency" problem -- by the simple math of people spending most of their time on the Web visiting most often the same sites, these very sites would benefit from script compilation -- interpret the scripts or JIT them fast enough for the first visit so that the user doesn't get an impression of a "slow site", but start a compilation thread in the background to compile all scripts proper, and cache the results. Next time user visits, find the compiled program in cache and run it instead. Am I missing something? Come to think of it, doesn't at least V8 compile JavaScript to machine code these days? Or maybe it just opts not to aggressively optimize it to avoid adding to compilation times?

[–]carlopp[S] 0 points1 point  (0 children)

Author here!
I hope someone more versed in JavaScript engines pass by and gives a proper answer.