On 4/18/12, Masahiro Nakagawa <[email protected]> wrote: > You can use direct-conversion deserialize > > Foo foo2; > msgpack.unpack(data, foo2); > > instead of > > msgpack.unpack(data).as!(typeof(foo)); > > I tested your code on my Mac. > Direct-conversion deserialize is 2x or 3x faster.
Wow, I had no idea there was a direct-conversion routine. On my machine here's the results, first the indirect conversion: globals.d(358): saved headers in 2327 msecs globals.d(364): loaded headers in 82058 msecs then the direct conversion: globals.d(358): saved headers in 2581 msecs globals.d(364): loaded headers in 4260 msecs That's almost a 20x speed improvement! Fantastic, this solves my problems! But what exactly is the difference between the two deserialization routines except the speed itself?
