How should I test 'your approach'? Would you share a patch?
Please, compare the two tests with the same number of iterations.

Paolo
On Wednesday, November 20, 2013 12:04:35 PM UTC+1, Arnon Marcus wrote:
>
> I get these results:
>
> C:\Python26\python.exe F:/Experimental/web2py_272/web2py/test_executesql.py
>> Times are for 100 iterations
>> Preparing....
>> started bench
>> speed_executesql() total=1.132703 avg=0.011327
>> speed_normal_rows() total=5.320367 avg=0.053204
>> speed_rows_with_cacheable() total=5.349665 avg=0.053497
>> speed_executesql_with_colnames() total=1.083485 avg=0.010835
>> speed_rows_with_simple_processor() total=1.202628 avg=0.012026
>> Process finished with exit code 0
>
>
> Pretty similar results...
> Although a little slower overall, same gaps appear.
>
>
> Then I tested it with timeit using your approach:
>
> Times are for 10 iterations
>> Preparing....
>> started bench
>> speed_normal_rows() total=47.711369 avg=4.771137
>> speed_executesql_with_colnames() total=0.513249 avg=0.051325
>
>
> That is a *x92.959318 times* (!) faster
> Almost full 2 orders of magnitude.
>
>
> On Tuesday, November 19, 2013 10:45:52 PM UTC+2, Niphlod wrote:
>>
>> if only those announcements came with actual reproducible tests..... life 
>> would be easier for us :-P
>> I'd guess your usecase is either 1k rows with 50 columns or a really slow 
>> python server, because I can't reproduce those kind of "advertised 
>> magnitude gains". Just a 4x that is quite expected since Rows carries 
>> around lots of helpers.
>>
>> CPython 2.7.3
>> speed_executesql() total=0.846748 avg=0.008467
>> speed_normal_rows() total=4.214647 avg=0.042146
>> speed_rows_with_cacheable() total=3.705196 avg=0.037052
>> speed_executesql_with_colnames() total=0.844287 avg=0.008443
>> speed_rows_with_simple_processor() total=0.891577 avg=0.008916
>>
>> pypy 1.9.0
>> speed_executesql() total=3.344496 avg=0.033445
>> speed_normal_rows() total=3.832903 avg=0.038329
>> speed_rows_with_cacheable() total=3.472066 avg=0.034721
>> speed_executesql_with_colnames() total=2.808536 avg=0.028085
>> speed_rows_with_simple_processor() total=3.268108 avg=0.032681
>>
>> Attached the test code.
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to