{"push_id":2409915030,"size":1,"distinct_size":1,"ref":"refs/heads/bestexpr","head":"d87990c935046b301ceb4c0ebd4bc340351ca699","before":"443795a28e7fddea217bc2f6c766e0aab38549ab","commits":[{"sha":"d87990c935046b301ceb4c0ebd4bc340351ca699","author":{"name":"Andrew Kimball","email":"93f5b0eff4aa8069432e5aa46db497a274729656@cockroachlabs.com"},"message":"opt: Improve building and traversing lowest cost expression tree\n\nThis PR contains several improvements with how we build and traverse\nthe lowest cost expression tree (i.e. bestExpr):\n\n1. bestExpr now stores its (lowest cost) children. This improves\n   traversal times. More importantly, it will enable us to make more\n   complex decisions about what physical properties to require of\n   children. For example, the MergeJoin operator will be able to pick\n   an arbitrary pair of left/right child expressions to merge.\n\n2. Temporary optimization state is now separate from bestExpr. This\n   sets us up to split out memo-related structs into another package.\n\n3. memoGroup and bestExpr optimize for the case where there is only\n   one expression in the group, and one bestExpr in the group. This is\n   very common, such as in the case of a scalar expression. By storing\n   the first expr and the first N best children inline, we avoid\n   allocations in the common case.\n\n4. ExprView now use bestExpr to traverse the lowest cost expression\n   tree, which is fast because bestExpr now stores its children.\n\nThe sum total of these improvements significantly improved the\nExprViewBenchmark:\n\n  name          old time/op   new time/op\n  ExprView/0-8  365ns ± 1%    233ns ± 2%\n\nRelease note: None","distinct":true,"url":"https://api.github.com/repos/andy-kimball/cockroach/commits/d87990c935046b301ceb4c0ebd4bc340351ca699"}]}
{"actor":{"display_login":"andy-kimball"}}