I had tried changing the battery setting from one end to other.
It had made no difference in speed. The new (and cheap, not from Dell, just some compatible item made in China) battery charger made the PC run fast again, without any other tweaking.
If true, you should have seem a BIOS alert at some point when first turning on the computer, telling you your charger was working at a reduced wattage.
If not that, then you had a bad wire in the AC or DC side of the power pack. That’s pretty dangerous. Look for an exposed wire or crushed/folded point. Also, a slight misalignment of the cable that plugs into the AC adapter could make less than optimal contact.