ZippyJSON icon indicating copy to clipboard operation
ZippyJSON copied to clipboard

RFC: The Future of ZippyJSON

Open michaeleisel opened this issue 1 year ago • 5 comments

From my benchmarking, JSONDecoder performs similarly (and often a bit faster) than ZippyJSON for iOS version 17+. For my users, I'm curious if there are still use cases where using ZippyJSON over JSONDecoder is desirable once they've set their minimum version to 17+ (cases where it's still faster, etc.). Otherwise, I will probably put up a notice informing people about Apple's new JSONDecoder performance, and in a few years when every app is on 17+, archive the repo. To all who see this issue, feel free to comment with your thoughts!

As a side note, I would love to take this as a challenge to optimize my project more and still provide a large speed boost over Apple's latest and greatest, but a lot of the overhead now seems to be concentrated in Swift runtime overhead, with stuff like protocol conformance lookups. This is, I think, why Apple's version and mine are now similar, and I imagine neither will change much now unless the runtime performance changes.

michaeleisel avatar Sep 23 '24 17:09 michaeleisel

is the new JSONEncoder similarly fast?

aehlke avatar Dec 05 '24 06:12 aehlke

I haven't measured it, and don't plan to. But if someone does, feel free to post the results

michaeleisel avatar Dec 05 '24 21:12 michaeleisel

I'm curious what does iOS 17+ version mean: Is this minimum deployment target or OS version at runtime?

rbsgn avatar Feb 13 '25 07:02 rbsgn

Phones on iOS 17+ will see a faster JSONDecoder regardless of the app’s min version. Companies that support older versions, though, may want to keep ZippyJSON until their min version is 17+.

On Thu, Feb 13, 2025 at 2:34 AM Roman Busygin @.***> wrote:

I'm curious what does iOS 17+ version mean: Is this minimum deployment target or OS version at runtime?

— Reply to this email directly, view it on GitHub https://github.com/michaeleisel/ZippyJSON/issues/69#issuecomment-2655749994, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFPOD32G6J44QDA2YI5ZML2PRDJHAVCNFSM6AAAAABOWQGFRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJVG42DSOJZGQ . You are receiving this because you authored the thread.Message ID: @.***> [image: rbsgn]rbsgn left a comment (michaeleisel/ZippyJSON#69) https://github.com/michaeleisel/ZippyJSON/issues/69#issuecomment-2655749994

I'm curious what does iOS 17+ version mean: Is this minimum deployment target or OS version at runtime?

— Reply to this email directly, view it on GitHub https://github.com/michaeleisel/ZippyJSON/issues/69#issuecomment-2655749994, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFPOD32G6J44QDA2YI5ZML2PRDJHAVCNFSM6AAAAABOWQGFRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJVG42DSOJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

michaeleisel avatar Feb 13 '25 17:02 michaeleisel

I still use the library on projects which deploy < iOS 17 for the fixed handling of Decimal decoding, which round trips through Double on older Apple OSes.

jshier avatar Aug 27 '25 18:08 jshier