https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andi Kleen <a...@gcc.gnu.org>: https://gcc.gnu.org/g:baf26fccfb51fa54fcf7c668b96cae4cdbe574b3 commit r15-7329-gbaf26fccfb51fa54fcf7c668b96cae4cdbe574b3 Author: Andi Kleen <a...@gcc.gnu.org> Date: Thu Dec 26 13:05:57 2024 -0800 Size input line cache based on file size While the input line cache size now tunable it's better if the compiler auto tunes it. Otherwise large files needing random file access will still have to search many lines to find the right lines. Add support for allocating one line anchor per hundred input lines. This means an overhead of ~235k per 1M input lines on 64bit, which seems reasonable. gcc/ChangeLog: PR preprocessor/118168 * input.cc (file_cache_slot::get_next_line): Implement dynamic sizing of m_line_record based on input length. * params.opt: (param_file_cache_lines): Set to 0 to size dynamically.