model-writtenrun 8314 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Amit Khandekar proposed three patches to reduce PL/pgSQL function-call overhead: factor top-level block execution, fold exec_stmt() into exec_stmts(), and inline the no-conversion path of exec_cast_value(), reporting improvements on both ARM and x86 systems in #1.
- Pavel Stehule questioned the realism of constant-assignment benchmarks in #2, prompting Amit's array-processing benchmark in #4; Pavel then tested the patches himself, reported smaller but positive gains, and assessed their code structure in #5 and #7.
- Michael Paquier requested profiling evidence in #8, and Amit supplied profiles in #9 and #12 showing reduced time in statement dispatch and assignment casting while keeping broader plan-cache optimization outside this work.
- Tom Lane found that the original top-level helper broke error-message translatability and mixed execution with caller-specific exit processing; his replacement in #15 preserved the inlining approach, restored interrupt checking, and added a separate optimization to save and restore err_stmt once per statement list.
- Amit accepted Tom's revised helper and confirmed similar performance in #16; Tom then committed both revised patches as 1f902d499e, additionally centralizing err_stmt clearing and adjusting initialization, comments, and formatting.
- Tom reported a two-to-three-percent statement-execution improvement on aarch64 and essentially none on x86_64, then reposted Amit's unchanged cast patch as the remaining work in #17.
- Tom committed the cast optimization from #17 with light comment and formatting edits as fe2e206cdb; his announcement in #18 noted an initially unreproducible slowdown and the difficulty of obtaining stable microbenchmark results.
- Amit confirmed the architecture-dependent gains and thanked Tom for committing the complete work in #19, leaving both optimizations landed and no patch outstanding.