I would like to add that, careful Apple buyers care about the product lifecycle and its valuation. Apple practice planned obsolesce, therefore, for a given CPU architecture or RAM configuration, from its inception, optimization, discontinuation, extended support, and finally included in the vintage list, is inevitable.
If you buy an iPhone 5 just days before the iPhone 5S launch, then even if the difference isn't major, years later, you will realize the difference when upgrading iOS. Newer features require this and that that you don't have in your devices, like Bluetooth LE, or 64-bit processors.
*It doesn't matter how performant a chip is today, what matters is where the chip is with respect to its product lifecycle.*