Hey Alexsander,
so I recently started adding the Codable protocol conformance to my KDTree framework.
After I finished the conformance to Encodable/Decodable and tested it with Apples JSONEncoder and PropertyListEncoder I noticed that decoding a tree from file took about 3 times as long as just loading my plain data from a csv AND building the tree again.
I know it's because the Apple Encoders use NSNumber and NSString internally which makes them slow. But I'm having a hard time accepting that loading the tree structure from a file is slower then running through all the sorting required to create a new tree.
So, my question to you, are you planning to update MessagePack.swift so that it will Encode/Decode Codable swift files?
I feel with Swift4 there will be a big need for faster alternatives to the JSONEncoder and PropertyListEncoder Apple provides :)
Thank you!
Hey Alexsander,
so I recently started adding the
Codableprotocol conformance to my KDTree framework.After I finished the conformance to
Encodable/Decodableand tested it with ApplesJSONEncoderandPropertyListEncoderI noticed that decoding a tree from file took about 3 times as long as just loading my plain data from acsvAND building the tree again.I know it's because the Apple Encoders use
NSNumberandNSStringinternally which makes them slow. But I'm having a hard time accepting that loading the tree structure from a file is slower then running through all the sorting required to create a new tree.So, my question to you, are you planning to update
MessagePack.swiftso that it will Encode/DecodeCodableswift files?I feel with
Swift4there will be a big need for faster alternatives to theJSONEncoderandPropertyListEncoderApple provides :)Thank you!