Performance of eval() in Javascript

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()?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 1 • Views: 2,985 • Replies: 0
No top replies


Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
  1. Forums
  2. » Performance of eval() in Javascript
Copyright © 2023 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 11/29/2023 at 06:36:15