GithubHelp home page GithubHelp logo

Comments (10)

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024 1

btw, in browsers msgpack-javascript now beats notepack.io :)
But in nodejs env notepack.io is still faster due to nodejs buffer usage.

from msgpack-javascript.

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024 1

yeah, these tests are not perfect. I need we need more investigation in this area.
I will try to partially finish my version and show it to you.
I still can see performance improvements, but it may be an issue with my code or tests.

from msgpack-javascript.

reZach avatar reZach commented on May 19, 2024 1

Thanks for making this a better library @gfx !

from msgpack-javascript.

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024

Actually we have 10-20 MB of compressed payloads, real size few times bigger 😄

from msgpack-javascript.

gfx avatar gfx commented on May 19, 2024

Does DataView have such overhead? I have read https://v8.dev/blog/dataview and in fact, DataView seems fast enough for NodeJS v12.

BTW My use cases are browsers, too. So I am focusing on browsers for now. Any optimizations are really welcome, though.

from msgpack-javascript.

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024

Take a look at this test https://jsperf.com/dataview-vs-typed-array-views
It's pretty old, but it shows not great number of DateView especially in GooglChrome.
Screen Shot 2019-05-28 at 17 28 16

I've tried to remove DateView partially from this project and use typed array approach for numbers decoding and it gave me a little bit more performance, but it's not ready for full testing yet. Float/Int64/Uint64 is not done yet.

from msgpack-javascript.

gfx avatar gfx commented on May 19, 2024

I think t https://jsperf.com/dataview-vs-typed-array-views does not fare because of peekN().

https://jsperf.com/dataview-vs-typed-array-views/28 seems more accurate and it suggests DataView is the fastest. What do you think about it?

from msgpack-javascript.

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024

I've tried https://github.com/finscn/fast-dataview and their perf tests gives me next in nodejs env:

==== performance ( 26KB * 1000) ====
FastDataView wirte: 60.103ms
FastDataView read: 129.790ms
DataView wirte: 84.796ms
DataView read: 174.511ms
==== verify with DataView ====

from msgpack-javascript.

gfx avatar gfx commented on May 19, 2024

Sounds an interesting idea. If the backend of DataView becomes faster, even if and only if on NodeJS, it is a kind of free lunch!

BTW I have released v1.2.2: v1.2.1...v1.2.2
and I'll become off-line because it is now 0:11 a.m. good night 😴

from msgpack-javascript.

sergeyzenchenko avatar sergeyzenchenko commented on May 19, 2024

Thanks, Good night :)

from msgpack-javascript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.