Changes between Version 9 and Version 10 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
11/16/09 16:24:14 (12 years ago)
Author:
Fran Boon
Comment:

Explicit select example

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v9 v10  
    1111 * If a specific inner-loop routine canot be optimised in Python, then consider writing a C routine for this use case.
    1212
     13=== Specific Examples ===
    1314{{{
    1415for i in range(0, len(rows)):
     
    1920 for row in rows:
    2021}}}
    21 (0.05 vs. 0.001 seconds in my test case).
     22(0.05 vs. 0.001 seconds in a test case).
     23----
     24{{{
     25value = table[id].field
     26}}}
     27runs 1.5x faster than:
     28{{{
     29value = db(table.id==id).select(table.field, limitby=(0,1))[0]
     30}}}
     31(0.012 vs. 0.007 seconds vs in a test case)
    2232
    2333=== Profiling ===