diff options
author | drh <drh@noemail.net> | 2018-09-20 19:02:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-09-20 19:02:15 +0000 |
commit | eda079cd2c8ac1217574cd372c7bbcf6f651ccab (patch) | |
tree | 1426ab64c86073c55d49fd39029c8cd092348dd8 /src/walker.c | |
parent | 85c6892aa45dc0f476aa9bd772c678215f679853 (diff) | |
download | sqlite-eda079cd2c8ac1217574cd372c7bbcf6f651ccab.tar.gz sqlite-eda079cd2c8ac1217574cd372c7bbcf6f651ccab.zip |
Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new
EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer.
This reduces the size of the Expr object by 8 bytes, reduces the overall
amount of code, and shaves over 1 million cycles off of the speed test.
FossilOrigin-Name: ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
Diffstat (limited to 'src/walker.c')
-rw-r--r-- | src/walker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/walker.c b/src/walker.c index b3d4cd805..c31d94f0b 100644 --- a/src/walker.c +++ b/src/walker.c @@ -55,8 +55,8 @@ static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){ if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort; } #ifndef SQLITE_OMIT_WINDOWFUNC - if( !ExprHasProperty(pExpr, EP_Reduced) && pExpr->pWin ){ - Window *pWin = pExpr->pWin; + if( ExprHasProperty(pExpr, EP_WinFunc) ){ + Window *pWin = pExpr->y.pWin; if( sqlite3WalkExprList(pWalker, pWin->pPartition) ) return WRC_Abort; if( sqlite3WalkExprList(pWalker, pWin->pOrderBy) ) return WRC_Abort; if( sqlite3WalkExpr(pWalker, pWin->pFilter) ) return WRC_Abort; |