Very simple code, why would there be performance problems

Thank you all, the problem has been solved