<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91710>91710</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lower performance of frequent jumps with goto statements
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bi6c
</td>
</tr>
</table>
<pre>
```c
#include <stdint.h>
static uint32_t a = 0x466AC3A6L;
int main (int argc, char* argv[])
{
p1:
a--;
if (a)
goto p1;
}
```
Hello, we are using clang to compile the above code in Ubuntu 22.04.3 LTS.
When the value of `a` increases, the execution time difference also increases when we compile it with llvmorg-13.0.0 and llvmorg-19-init. The execution time result of above code is shown below.
```
~/compiler-builds/llvmorg-13.0.0_build/bin/clang test.c -o exec1
time ./exec1
real 0m0.276s
user 0m0.276s
sys 0m0.000s
~/compiler-builds/llvmorg-19-init_build/bin/clang test.c -o exec2
time ./exec2
real 0m1.738s
user 0m1.738s
sys 0m0.000s
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMlE1v4zYQhn8NdRmYoEiLsg86ZJMaPeytW_S4oKixxAVFuvyINpf-9oKSkrhNgFYwZOrlzMuHww8VoxkdYkeaL6R5qlROkw9db6Suej-8dESy7acJeyLsgXBhnLZ5QCDiMabBuEQnIn7Zu9d3TCoZDdm4JPj3BAqIeAL28yjlw6N4kF-J-HIfb1yCWRkHhJ9KW4VRE_4IelKB8Ify_bwBEn7eE9vd4VYTsdsAAKjD4c0c1sdci616y4S3Z_TJQ8l_hWmf9sbrpO8hf0VrfaFaEFRAyNG4EbRVboTkQfv5ZixCmhBU758RtB8QjIPf--xSBs4pO1IBX7_9RjfHPyZ0a_yzshnBX4FIpohkYJwOqCLGMl6JwJ-oczLeQTIzwmCuVwzoNIKy0b_Hw1I8F3zDMQkWkyaw9nn2YTzUgjLKQLnhXTofjDOJwrePAwWM2aaCdj-nCHHyi4MerV_ofZH-Vbm_CL_sJOHQZ2OHSPjlnyzfV53wS29cCd8KijFRDQe_AtWb20pECb_cads7oLJlRdnMKG9l3NQcMXxU40tcFcZYvPf4D9atSP8Dln8Cyz-HrWkrTh9g79VPYF8rXA2dGM7irCrs6rZuBG_PtaimTjTyxLhuaoaDOmnen1smpJStQtXK67kyHWf8yJqasbY5CUGlljg0g2z6Iz_yQZAjw1kZS8vsqQ9jZWLM2J3rtmaVVT3auN4YnDtcYO0knJcLJHQl59DnMZIjsyam-O6STLLYWb9ggBuGqw-zKnvYX-Ea8M-MLsGPPN_itmfX81nuEpzRpVjlYLsppVssJ55fCL-MJk25p9rP-1Ltf4db8D9QJ8IvK1xZyRX-7wAAAP__Hah5wQ">