You might also be able to play with power management settings to see if anything is slowing down the CPU whilst on battery.
Out of curiosity, was this Win 7, 8.x, or 10. If it’s 8.x or 10, might as well downgrade or run an alternative OS: 10 is spyware that is under complete control of Microsoft.
I tried Windows 10, did not like it, and happily back running Windows 7.