Changes between Initial Version and Version 1 of Ticket #33015, comment 3


Ignore:
Timestamp:
Aug 14, 2021, 7:06:45 AM (3 years ago)
Author:
Keryn Knight

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33015, comment 3

    initial v1  
    3434}}}
    3535
    36 I don't know that the simple Q based version will ever be as fast as `extra` (as used above) or the `ExpressionTuple` (also above), but it begins to look ''almost'' acceptable, certainly compared to the previous.
     36I don't know that the simple Q based version will ever be as fast as `extra` (as used above) or the `ExpressionTuple` (also above), but it begins to look ''almost'' acceptable, certainly compared to the previous;
     37
     38cProfile output for `3.2.6` (less likely to have changed method names etc than `2.2`) I think all but confirms it being the ticket mentioned above:
     39{{{
     40   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     41 50005000   27.676    0.000   74.102    0.000 tree.py:68(__eq__)
     42 50500000   27.229    0.000   46.430    0.000 lookups.py:151(__eq__)
     43100980000   15.549    0.000   15.549    0.000 lookups.py:147(identity)
     44    50002    9.352    0.000   83.492    0.002 tree.py:78(add)
     45 50740007    3.709    0.000    3.747    0.000 {built-in method builtins.isinstance}
     46  30001/1    0.266    0.000   85.239   85.239 query.py:1231(build_filter)
     47  10002/1    0.141    0.000   85.239   85.239 query.py:1401(_add_q)
     48    40000    0.102    0.000    0.126    0.000 query.py:1474(names_to_path)
     49    20000    0.068    0.000    0.137    0.000 query.py:1577(setup_joins)
     50}}}
     51and main as of aforementioned commit:
     52{{{
     53   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     54  30001/1    0.182    0.000    1.286    1.286 query.py:1221(build_filter)
     55    40000    0.144    0.000    0.159    0.000 query.py:1457(names_to_path)
     56  10002/1    0.078    0.000    1.286    1.286 query.py:1386(_add_q)
     57    20000    0.046    0.000    0.380    0.000 query.py:1156(build_lookup)
     58    20000    0.045    0.000    0.179    0.000 query.py:1560(setup_joins)
     59   220007    0.040    0.000    0.066    0.000 {built-in method builtins.isinstance}
     60    20000    0.037    0.000    0.090    0.000 query.py:1093(solve_lookup_type)
     61    20000    0.036    0.000    0.054    0.000 query_utils.py:146(get_lookup)
     62   280005    0.036    0.000    0.036    0.000 {built-in method builtins.hasattr}
     63    20000    0.028    0.000    0.119    0.000 local.py:114(__getattr__)
     64    30002    0.026    0.000    0.041    0.000 tree.py:79(add)
     65}}}
Back to Top