Comments (10)
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.
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.
Thanks for making this a better library @gfx !
from msgpack-javascript.
Actually we have 10-20 MB of compressed payloads, real size few times bigger 😄
from msgpack-javascript.
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.
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.
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.
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.
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.
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.
Thanks, Good night :)
from msgpack-javascript.
Related Issues (20)
- Question re using with flow.js HOT 1
- Cannot use reusable encoders/decoders in custom codecs
- [bug] decode throws RangeError on empty Uint8Array HOT 2
- raw_ref type? HOT 2
- How can we convert the msgpack-encoded str back to the origin info HOT 2
- How to solve the problem of large integer accuracy loss
- Encoder Reuse Bug? HOT 2
- Cannot find module
- RangeError: Start offset undefined is outside the bounds of the buffer HOT 3
- Non reversible timestamp encoding HOT 1
- feature request: option to disable TEXT_ENCODING env check HOT 4
- There has a way to decode extension type from another language? HOT 3
- can i override the int64 decoder?
- Invalid integer string convertion from PHP serialized .msgpack HOT 1
- error on https://msgpack.org/
- Decoding of 32 bit floats is not precise HOT 3
- npm `latest` tag on `3.0.0-beta`
- add deno example with `import 'npm:@msgpack/msgpack'` HOT 1
- Encoder / Decoder classes dont work with `new ExtensionCodec()` for handling Set and Map in typescript
- Need support bigint HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgpack-javascript.