<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/95525>95525</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] clang-format performance for 18.1.7 seem reduced
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format,
            performance
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mydeveloperday
      </td>
    </tr>
</table>

<pre>
    I'm logging this as I've just noticed my vim taking longer to auto-save than I'm used to (several seconds)

This is not a thorough investigation, but taking a 4500 line file from our project and running

time clang-format file.cxx > /dev/null

I have a local .clang-format file with just

---
BasedOnStyle: LLVM
Language: Cpp
---

for various version (that I happen to have) yields longer times for 18 than previous versions.

18.1.7 = 1.813s
17.0.6 = 0.837s
16.0.6 = 0.604s
15.0.7 = 0.415s

Ok not totally scientific but but I've run it multiple times and there is a noticible slowdown on 18 (I have an i9 so I'm not running this on old hardware) 

I've checked 18.1.7 has not been built with debug, I downloaded it directly from the releases here on github. 

This could be either how its built (clang generating slower code), or a change we the clang-format team have made.. I'll try and test some other versions to see if I can see when it crept in.

Anyone else seeing this?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkVM2OozgQfhrnUgoCA0k4cOjp3kgt9WoOu9p7YVfA08ZG_iHD268MZDc9cwhJCqq--n4weq96Q9Sy-hur3w4Yw2BdOy6SZtJ2IidxOXRWLu074-cRtO17ZXoIg_KAHlJ1JvgRfQBjgxIkYVxgViME_ExPamt6chAsYAz26HEmCAMa2AZGTzLdZPziaSaHGjwJa6RnvGH5G8tftuvfCVH5hAIIaU0b-wGUmckH1WNQ1jD-Cl0MD2iEqs5z0MoQ3JQmuDk7go0OJmd_kAiARoKLxijTP2MFNRIIjaY_3qwbMaztmfj5E1j5BzB-lTQzfjVR6-e-dxgSPQRtBWrIfhsBdxWGVa3ntuPxuP34hp7kd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