opshin icon indicating copy to clipboard operation
opshin copied to clipboard

Comparison chaining evaluates values several times

Open nielstron opened this issue 1 year ago • 0 comments

Currently comparison chaining is internally just rewritten such that x < y < z becomes x < y and y < z. In the case where y is not a constant, this actually breaks the semantics of python which state that the inner value should only be computed once. It does not matter here, since the only side effect is tracing - but should still be fixed also for reducing computation cost

Bug bounty: 500 ADA

nielstron avatar Sep 12 '23 13:09 nielstron