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

[Idea] May be consider msgpackr? #10

Open
shitpoet opened this issue Feb 10, 2022 · 1 comment
Open

[Idea] May be consider msgpackr? #10

shitpoet opened this issue Feb 10, 2022 · 1 comment

Comments

@shitpoet
Copy link

msgpackr is an optimized msgpack-compatible library.

https://github.com/kriszyp/msgpackr

It has node.js native c++ extension to speed up working with strings, and so it is more on par with native JSON, at least at the node part.

Benchmarks in the article by the author show good performance

link - https://dev.doctorevidence.com/building-the-fastest-js-de-serializer-a413a2b4fb72

Note: But it should be noted that JSON.parse/stringify are benchmarked with string-to-binary and binary-to-string conversion time included. So msgpackr is still slower than JSON in browsers, where there is no custom native extension available.

I've thought may be developers of this package could be interested in exploring this. May be on some next major release on next protocol upgrade or something like that.

Feel free to close this)

@darrachequesne
Copy link
Member

The number of msgpack implementations is staggering 😄

The size of the browser bundle seems a bit bigger though:

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

No branches or pull requests

2 participants