Lag while unplugged

By default, when you unplug, the system will switch to the battery power mode and try to save power as much as it can, which usually means slowing down the CPU/GPU clock rates, amongst other things.
You could try manually changing the power plan back to High Performance.