Sorry, but your assumption is wrong. Lisp is nice and all, but it isn't magic dynamic performance pixie dust.
Compiling/running something that looks sort of like basic JavaScript is one thing. But it is not what is needed.
Add in what is necessary to have said JavaScript have variables that autoconvert between integer, floating point, and string representations according to the spec. Add in the variable lookup method that JavaScript uses. (Variables are looked up in a series of scopes, starting with the current function call.) Add in the object model that JavaScript uses. Continue through the spec, and you will keep on making things slower and slower.
Once you're done, even though you started with Lisp, you've simply got another implementation of a JavaScript runtime that is slow for all the reasons that any other is. It could be faster or slower than existing implementations. Given the optimization effort that has gone into those implementations, it likely will be slower by a wide margin.
At that point, figuring out whether to finish writing a browser in Lisp, or whether to load Lisp into a browser and apply the right JavaScript hooks is up to you. But your performance assumptions are wrong.
Now looking at this, you could be tempted to say that it would be nice to create a new language that can be dynamic and performs better. It would be, but there is a chicken and egg problem. Unless all browsers have it, nobody will use it. Unless people use it, browsers won't write it. This is solvable, for instance look at HTML5 Canvas. But it seems easier to solve if it is targeted at a known pain point, see HTML5 Canvas. Ripping out all of JavaScript for something else does not seem to be an easy thing to do. (Microsoft tried back at the dawn of the web age. When was the last time you saw VBScript in the wild?)
eval()
. JavaScript needs a smart tracing JIT to be efficient, any form of static compilation, no matter how sophisticated, will fail for such a dynamic language.eval()
would hurt. It'd just compile theeval
string, no? Or there's something I'm not understanding.eval
has to assume that its argument is dynamic. This means that you cannot JIT-compile and optimize into theeval
; every time theeval
statement is called, the argument has to be parsed and JIT-compiled, and theeval
call forms a boundary for things like CSE and other optimizations.eval
too. So it'd use its runtime engine to execute it.eval
would be slow, but it's to be expected anyway.