You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Benchmark plxcobol; add STRING-APPEND, %, and a VARYING->FOR fast path
Add plxcobol to the benchmark harness across all five workloads. Two changes
make the comparison fair and idiomatic:
- STRING-APPEND <expr> TO <var> lowers to the plx_strbuild string builder, the
COBOL counterpart of the other dialects' append operators, so in-loop string
building is amortized O(1) (10 ms vs plpgsql's 1743 ms).
- A PERFORM VARYING v FROM a BY 1 UNTIL v > b (or >= b) counting loop now lowers
to a plpgsql integer FOR loop instead of a WHILE with a manual step; this
brings arith from 2.6x to parity with plpgsql. Other VARYING forms keep WHILE.
- % is accepted as the modulo operator in expressions.
Result on PostgreSQL 18.4: plxcobol matches plpgsql on arith (0.97x), strbuild
(10 ms), iter (1.09x), and call (1.04x). Branch is 1.32x because EVALUATE lowers
to CASE rather than the IF/ELSIF chain the other dialects use. Adds a
STRING-APPEND regression case; all 9 suites pass on PostgreSQL 17 and 18.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments