Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create serializer benchmarks and integrate to CI #491

Open
klimashkin opened this issue Feb 12, 2020 · 2 comments
Open

Create serializer benchmarks and integrate to CI #491

klimashkin opened this issue Feb 12, 2020 · 2 comments

Comments

@klimashkin
Copy link

klimashkin commented Feb 12, 2020

Hi! Would it be possible to retire msgpack5?
According to my tests on different payloads msgpack5 is more than 3x times slower than the official @msgpack/msgpack, with the identical output.

Here some articles, related to the latter:
https://appspector.com/blog/how-to-improve-messagepack-javascript-parsing-speed-by-2-6-times
https://appspector.com/blog/how-to-use-streaming-data-parsing-in-javascript

@oberstet
Copy link
Contributor

According to my tests on different payloads msgpack5 is more than 3x times slower than the official @msgpack/msgpack, with the identical output.

we don't have tested different cbor libraries on diffferent run-times (browser, node, ..) using different payloads yet

we have tested crossbar (and autobahn|python) in such systematic way, here are 2 links to give you a clue:

until we have similar comprehensive test results, claims to "X being faster than Y" are not convincing and it doesn't make sense to change stuff in blind

IMO, we need to systematically produce results at least for:

  • different serializers (libraries)
  • chrome, firefox and node
  • different WAMP messages, with different payload sizes and payload complexity

@oberstet oberstet changed the title Replace msgpack5 with @msgpack/msgpack Create serializer benchmarks and integrate to CI Feb 13, 2020
@klimashkin
Copy link
Author

klimashkin commented Feb 13, 2020

Thanks for sharing those benchmarks, didn't see them before!

In my case I was just naively testing simple buffer(stringify), stringify+gzip, messagepack and cbor on the latest NodeJS using the npm libraris. Encode/decode on each approach was run 1000 times in a loop.
CBOR was always slightly bigger than the MessagePack (Length=size)
Sharing the results here as it might be helpful for somebody

5.5Kb JSON
5 5Kb

160Kb JSON
160Kb

1.5Mb JSON
1 5Mb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants