On Monday, 29 June 2015 at 10:22:10 UTC, Atila Neves wrote:
On Monday, 29 June 2015 at 08:45:15 UTC, Atila Neves wrote:
On Sunday, 28 June 2015 at 17:02:42 UTC, Nordlöw wrote:
On Friday, 26 June 2015 at 21:40:49 UTC, Atila Neves wrote:
I'd have to benchmark it against something, but I'm pretty sure cerealed is fast.

Faster than msgpack?

I guess I'm going to have benchmark this now... :)

Atila

In release builds, _nearly_. Here's the benchmark program: http://dpaste.dzfl.pl/17b0ed9c0204. Results below. msgpack is... fast. From the docs, cerealed seems to have more features that I actually use and need though.

Results:

DMD debug:

Cerealed: 4 secs, 987 ms, 700 μs, and 5 hnsecs
MsgPack:  1 sec, 771 ms, 713 μs, and 7 hnsecs

DMD release:

Cerealed: 2 secs, 556 ms, 714 μs, and 6 hnsecs
MsgPack:  1 sec, 89 ms, 561 μs, and 3 hnsecs


GDC debug:

Cerealed: 4 secs, 863 ms, 501 μs, and 1 hnsec
MsgPack:  2 secs, 32 ms, 53 μs, and 1 hnsec


GDC release:

Cerealed: 1 sec, 740 ms, 726 μs, and 4 hnsecs
MsgPack:  1 sec, 20 ms, 287 μs, and 3 hnsecs


LDC debug:

Cerealed: 7 secs, 711 ms, 154 μs, and 4 hnsecs
MsgPack:  3 secs, 694 ms, 566 μs, and 2 hnsecs


LDC release:

Cerealed: 1 sec, 795 ms, 380 μs, and 7 hnsecs
MsgPack:  931 ms, 355 μs, and 5 hnsecs



Before I had time to look into it, somebody graciously optimised cerealed for me in this PR:

https://github.com/atilaneves/cerealed/pull/6

And now then benchmarks are (dub build --build=release, fastest of 10 runs for each compiler):

DMD:
Cerealed: 1 sec, 199 ms, 118 μs, and 1 hnsec
MsgPack:  1 sec, 85 ms, and 516 μs

GDC:
Cerealed: 927 ms, 677 μs, and 4 hnsecs
MsgPack:  1 sec, 32 ms, 736 μs, and 5 hnsecs

LDC:
Cerealed: 970 ms, 482 μs, and 6 hnsecs
MsgPack:  896 ms, 591 μs, and 2 hnsecs


Not too shabby!

Atila


Reply via email to