Thomas Munro <thomas.mu...@gmail.com> writes: > On Sat, Dec 16, 2023 at 3:44 PM Tom Lane <t...@sss.pgh.pa.us> wrote: >> Thomas Munro <thomas.mu...@gmail.com> writes: >>> FYI, it looks like there is a big jump in CPU time to compile preproc.c at >>> -O2: >>> clang15: ~16s >>> clang16: ~211s >>> clang17: ~233s
>> What are the numbers for gram.c? > clang15: ~3.8s > clang16: ~3.2s > clang17: ~2.9s Huh. There's not that many more productions in the ecpg grammar than the core, so it doesn't seem likely that this is purely a size-of-file issue. I'd bet on there being something that clang doesn't do well about the (very stylized) C code being generated within the grammar productions. We actually noticed this or a closely-related problem before [1] and briefly discussed the possibility of rearranging the generated code to make it less indigestible to clang. But there was no concrete idea about what to do specifically, and the thread slid off the radar screen. regards, tom lane [1] https://www.postgresql.org/message-id/20220902174033.wgt6li7oiaxmw...@awork3.anarazel.de