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

Performance #11

Open
paulirish opened this issue Feb 3, 2016 · 2 comments
Open

Performance #11

paulirish opened this issue Feb 3, 2016 · 2 comments

Comments

@paulirish
Copy link

Just to give folks an idea of perf of this lib, I ran a really simple benchmark with a ~200kb object.

image

Also I tried a similar test with node-cbor and got similar numbers:
https://tonicdev.com/paulirish/56b25695414a7c0c0012b030

@richardstartin
Copy link

That's to be expected - JSON.parse has browser native support. C++/text trumps javascript/binary.

@sotex
Copy link

sotex commented Dec 11, 2019

@paulirish @richardstartin
I have the same situation.
I use ajax to download the data and decode it.
Test results show that JSON takes half as long as CBOR.

I think we can improve the performance of decoding CBOR through wasm.
cbortime

    console.time("cbor");
    geojson2 = CBOR.decode(data);
    console.timeEnd("cbor");
          console.time("geojson");
          geojson1 = JSON.parse(data);
          console.timeEnd("geojson");

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

3 participants