1
   

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/Embed
Type: Question • Score: 1 • Views: 299 • Replies: 0
No replies

 
 

Related Topics

The "Death" of the Computer Mouse - Discussion by Phoenix32890
Blue screen of Death - Question by dagmaraka
How does one uninstall a program? - Question by Woollcott
how do you type pi? - Question by C99
Conficker worm - Discussion by msolga
SYSTRAY MISSING - Discussion by Misti26
Broad Jump Client Foundation - Discussion by Mustang
 
  1. able2know
  2. » Performance of eval() in Javascript
Copyright © 2009 Horizontal Verticals :: Page generated in 0.35 seconds on 11/24/2009 at 04:40:50 Top End