A C++ library for parsing expressions with Python syntax and using SIMD for repetitive evaluation. Amortization of the interpreter overhead leads to nearly peak CPU performance..
(LEFT_OP rel_left MID_OP) and (MID_OP rel_right RIGHT_OP)
but the MID_OP has to be evaluated just once.
To implement this we need special support in transformation mechanism from AST to the expression DAG
or we need reliable optimization to eliminate duplicate evaluation.
Implement chained comparisons:
0 < x < 1
.The chained expression
LEFT_OP rel_left MID_OP rel_right RIGHT_OP
is equivalent to:
(LEFT_OP rel_left MID_OP) and (MID_OP rel_right RIGHT_OP)
but the
MID_OP
has to be evaluated just once.To implement this we need special support in transformation mechanism from AST to the expression DAG or we need reliable optimization to eliminate duplicate evaluation.
See branch JB_chained.