View Single Post
Old 02-22-2005, 11:34 AM   PM User | #2
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Well, never having worked with ActionScript I can't say anything final, but I know that the compact ECMAScript specification allows dropping of eval and the like for speed when embedding the language.

I suggest you replace the variables count_1 through count_7 with an array count instead, and use array notation count[x] instead of eval('count_'+x). Additionally, array lookup is many times faster than eval, so that might even speed the execution up.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

Last edited by liorean; 02-22-2005 at 02:14 PM..
liorean is offline   Reply With Quote