Changes between Version 9 and Version 10 of DeveloperGuidelines/Optimisation
- Timestamp:
- 11/16/09 16:24:14 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Optimisation
v9 v10 11 11 * If a specific inner-loop routine canot be optimised in Python, then consider writing a C routine for this use case. 12 12 13 === Specific Examples === 13 14 {{{ 14 15 for i in range(0, len(rows)): … … 19 20 for row in rows: 20 21 }}} 21 (0.05 vs. 0.001 seconds in my test case). 22 (0.05 vs. 0.001 seconds in a test case). 23 ---- 24 {{{ 25 value = table[id].field 26 }}} 27 runs 1.5x faster than: 28 {{{ 29 value = db(table.id==id).select(table.field, limitby=(0,1))[0] 30 }}} 31 (0.012 vs. 0.007 seconds vs in a test case) 22 32 23 33 === Profiling ===