a2 / MessagePack.swift

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]
http://msgpack.org
MIT License
283 stars 60 forks source link

Improve performance of unpackArray #39

Closed BrettThePark closed 7 years ago

BrettThePark commented 7 years ago

Unpacking became many times slower after the Swift 3.0 update. Using reduce to unpack a very large array slows performance. Switching to a for loop increases performance by ~10x.

For Example, a 40k element double array goes from 0.8s to 0.08s