Do you want MySQL with the best possible performance? Then stick to version 5.6, as long as you don't mind it's been EOL for 12 years. 5.7 also has better performance than newer versions, although not as good as 5.6. Some performance regressions are just not being fixed.
https://smalldatum.blogspot.com/2025/08/sysbench-for-mysql-56-thru-94-on-small.html
^^ Veteran database performance guru, Mark Callaghan, former tech lead for MySQL at Facebook and Google, is now an independent consultant who blogs about database benchmarking.
(For my own account as a MariaDB fanboy I must add that another option could be migrating to MariaDB which is a plug-in replacement for MySQL 5.6, as MariaDB has done a better job at avoiding and fixing performance regressions.)