Changes between Version 7 and Version 8 of DeveloperGuidelines/Optimisation
- Timestamp:
- 11/16/09 08:22:33 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Optimisation
v7 v8 3 3 Writing code which runs fast. 4 4 5 Consider having configurations which are ad from DB frequently but written-to rarely, be set in configuration files which are written-out from the DB (like the CSS from themes)5 Consider having configurations which are read from DB frequently but written-to rarely, be set in configuration files which are written-out from the DB (like the CSS from themes) 6 6 7 * http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Loops 7 8 * http://www.python.org/doc/essays/list2str/ 8 9 * http://www.skymind.com/~ocrow/python_string/ 9 10 * http://diveintopython.org/performance_tuning/index.html 11 * If a specific inner-loop routine canot be optimised in Python, then consider writing a C routine for this use case. 12 13 {{{ 14 for i in range(0, len(rows)): 15 row=rows[i] 16 }}} 17 runs much faster than: 18 {{{ 19 for row in rows: 20 }}} 21 (0.05 vs. 0.001 seconds in my test case). 10 22 11 23 === Profiling ===