mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add a case to speedtest1.c that demonstrates the need to factor OP_Column
operators out of inner loops. FossilOrigin-Name: 69a17336fdf4ae891e815914be8942f7222230c2
This commit is contained in:
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\scompiler\sharmless\swarnings\sin\stclsqlite.c\sthat\sappeared\swith\sGCC\s4.8.x.
|
||||
D 2013-12-20T18:57:44.631
|
||||
C Add\sa\scase\sto\sspeedtest1.c\sthat\sdemonstrates\sthe\sneed\sto\sfactor\sOP_Column\noperators\sout\sof\sinner\sloops.
|
||||
D 2013-12-21T00:04:37.543
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -822,7 +822,7 @@ F test/speed3.test d32043614c08c53eafdc80f33191d5bd9b920523
|
||||
F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715
|
||||
F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa
|
||||
F test/speed4p.test 0e51908951677de5a969b723e03a27a1c45db38b
|
||||
F test/speedtest1.c 47788d552a349241471ad06d239383dadd97164d
|
||||
F test/speedtest1.c 60d9ebc64c036ee7803cc5323ef5204686312f5b
|
||||
F test/spellfix.test 8c40b169b104086d8795781f670ba3c786d6d8be
|
||||
F test/sqllimits1.test b1aae27cc98eceb845e7f7adf918561256e31298
|
||||
F test/stat.test 76fd746b85459e812a0193410fb599f0531f22de
|
||||
@ -1147,7 +1147,7 @@ F tool/vdbe-compress.tcl 0cf56e9263a152b84da86e75a5c0cdcdb7a47891
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
||||
P 0026d3355340d66687a3fd4cbece28811ef1b505
|
||||
R 1e7ba7ea1368145f32bc284eea0efbfc
|
||||
P d93ae6833a7fca0672caf902a7b48846e54242cd
|
||||
R 1bba9a023d69c9c6d571dcfd3bfe83d6
|
||||
U drh
|
||||
Z b38a5e6618ad563a8f912c35a2908336
|
||||
Z 60543214dfc95183844c1868498ec509
|
||||
|
@ -1 +1 @@
|
||||
d93ae6833a7fca0672caf902a7b48846e54242cd
|
||||
69a17336fdf4ae891e815914be8942f7222230c2
|
@ -378,6 +378,19 @@ static void randomFunc(
|
||||
sqlite3_result_int64(context, (sqlite3_int64)speedtest1_random());
|
||||
}
|
||||
|
||||
/* Estimate the square root of an integer */
|
||||
static int est_square_root(int x){
|
||||
int y0 = x/2;
|
||||
int y1;
|
||||
int n;
|
||||
for(n=0; y0>0 && n<10; n++){
|
||||
y1 = (y0 + x/y0)/2;
|
||||
if( y1==y0 ) break;
|
||||
y0 = y1;
|
||||
}
|
||||
return y0;
|
||||
}
|
||||
|
||||
/*
|
||||
** The main and default testset
|
||||
*/
|
||||
@ -692,7 +705,15 @@ void testset_main(void){
|
||||
speedtest1_exec("COMMIT");
|
||||
speedtest1_end_test();
|
||||
|
||||
|
||||
speedtest1_begin_test(320, "subquery in result set", n);
|
||||
speedtest1_prepare(
|
||||
"SELECT sum(a), max(c),\n"
|
||||
" avg((SELECT a FROM t2 WHERE 5+t2.b=t1.b) AND rowid<?1), max(c)\n"
|
||||
" FROM t1 WHERE rowid<?1;"
|
||||
);
|
||||
sqlite3_bind_int(g.pStmt, 1, est_square_root(g.szTest)*50);
|
||||
speedtest1_run();
|
||||
speedtest1_end_test();
|
||||
|
||||
speedtest1_begin_test(980, "PRAGMA integrity_check");
|
||||
speedtest1_exec("PRAGMA integrity_check");
|
||||
|
Reference in New Issue
Block a user