Reply
Tue 17 Mar, 2009 09:07 am
I have a Javascript project where I need to use eval(). I am writing a JIT compiler for the Z-Machine, so I cannot remove all use of eval().
However, I hope I can make it more efficient. At the moment eval() is taking around 30% of the CPU time for the project, which is quite a lot.
What is it about eval() that takes so much time? How can I minimise the time eval() spends?
I also have a with statement in the eval()ed code. Should I remove that? What is the scope of eval()?