reduce, used properly, can be lightning fast. Here's where it yielded 200x improvement over nested for-in loop.
Even with Codable available in Swift 4, I still prefer using Marshal library. Here’s how to extend it to properly handle JSON representations of Date