Hello Stefan, On 23 September 2010 10:31, Stefan Andersson <[email protected]> wrote: > > are we doing.... > > 1. loop optimizations? > 2. variable declaration concatenation? > 3. dynamic window optimization -> reuse? > 4. maximize object resolution speed and minimize scope chain? > 5. speed up object-property lookups inside a loop? > 6. Reduce the number of dot lookups ("dot calls") using forms? > 7. minimize lookups inside a loop involving arrays? > 8. minimize the use of document.write call statements? > 9. dynamically call several external files? > 10. avoid unnecessary DOM references in objects? > 11. minimize Math lookups? > 12. caching frequently used global objects or property references? > 13. avoid the use of for-to loops? > 14. execute a do-while loop with flipped and reverse counting but counting > up, not down? > > if not? why not? The "compiled" code is not going to be read anyways...
Disclaimer: I'm no compiler expert, but have a general interest Javascript is actually quite a hard language to optimise as it is a high level dynamic language, and heavily based on Objects and method calls. Some of the optimisations you cite can be applied within the Javascript interpreter, and that's exactly what is happening inside the major browser. You'll see that applications like gmail are getting more responsive year on year (not just due to hardware, but due to better JS interpreters). This is great as it means all JS frameworks are benefiting from these optimisations, Qooxdoo included. Having said that, a lot of work has gone on to improve Qooxdoo performance from an engineering standpoint using profiling, and these may well have had more dramatic improvements than any of the optimisations you've listed. (i.e. what is the fastest way to call a method on each browser/what's the most efficient way to manipulate an array and hash on each platform/what operations can be made lazy to improve startup time etc. etc) So in summary, Qooxdoo does many optimisations based on measurement and what is realistic, and then some of the optimisations you list happen inside the browser for additional ooomph. Hope I explained that OK. Nick ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
