On paper, the Galaxy S5 and the new HTC One (M8) sport relatively the same specs. The S5 does sport a slightly faster Snapdragon 801 chipset — 2.5GHz vs. 2.3GHz on the One — but that difference is barely noticeable in real life.
Well, as it turns out, Samsung did not really pay much attention to optimising its TouchWiz skin for the hardware on the Galaxy S5 and the device is actually slower than the One (M8) in certain day-to-day tasks.