Skip to content

Performance difference Foundation JSON vs. PureSwiftJSON #5

Closed
@fabianfett

Description

@fabianfett

swift 5.1.4 on Amazon Linux 2

Foundation.JSONCoding
-----------------------------
string, cold: 25724953 (ns)
string, warm: 370171 (ns)
json, cold: 25843952 (ns)
json, warm: 423885 (ns)
-----------------------------

PureSwiftJSONCoding
-----------------------------
string, cold: 23219984 (ns)
string, warm: 372525 (ns)
json, cold: 23525811 (ns)
json, warm: 390062 (ns)
-----------------------------

boot speedup: 8-10% (not linking Foundation, statically linking PureSwiftJSONCoding)
json warm speedup: 8% should be more with larger json payloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions