Revert "chore: add some static optimization (#294)"#344
Revert "chore: add some static optimization (#294)"#344stephenamar-db merged 1 commit intomasterfrom
Conversation
ad4a1b0 to
bd88105
Compare
This reverts commit 60db9d0.
bd88105 to
89416b5
Compare
|
@He-Pin it's going to be a partial revert, because your optimizations fixed a bug we had with short-circuiting boolean ops. |
|
@stephenamar-db Thank you. I think another weird bug left is #331, anyway, we are unlikely to write that code :) |
|
My gut feeling is that the optimizations around Val.Obj caused them to be evaluated early. |
I'm looking at this too. trying to figure what what needs to be changed in the optimizer to make them work. |
|
Cool, I think the bug is if there is an That's my guess, and another thing is, we may just pass the |
| case BinaryOp(pos, Val.Num(_, l), BinaryOp.OP_<=, Val.Num(_, r)) => Val.bool(pos, l <= r) | ||
| case BinaryOp(pos, Val.Str(_, l), BinaryOp.OP_<=, Val.Str(_, r)) => Val.bool(pos, l <= r) | ||
| case BinaryOp(pos, Val.Num(_, l), BinaryOp.OP_>=, Val.Num(_, r)) => Val.bool(pos, l >= r) | ||
| case BinaryOp(pos, Val.Str(_, l), BinaryOp.OP_>=, Val.Str(_, r)) => Val.bool(pos, l >= r) |
There was a problem hiding this comment.
Maybe we can extract all BinaryOp to a single method with transformBinaryOp, which may help too.
@stephenamar-db
|
@stephenamar-db What's the number after revert this. |
This partially reverts commit 60db9d0.
This is causing performance regressions