mcollina / mcollina/msgpack5

Add benchmark results compared to JSON to README?

Open
#73 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
499
Forks
77
PR merge metrics
No merged PRs in 30d

Description

encodedecode_json.js

var msg = { hello: 'world' }
var encode = JSON.stringify
var decode = JSON.parse
var max = 100000
var start
var stop
var i

function run () {
  for (i = 0; i < max; i++) {
    decode(encode(msg))
  }
}

// preheat
run()

start = Date.now()
run()
stop = Date.now()
console.log('time', stop - start)
console.log('decode/s', max / (stop - start) * 1000)
$ node encodedecode_json.js
time 79
decode/s 1265822.7848101268

compared to

$ node encodedecode.js 
time 1594
decode/s 62735.25721455458

Am I misunderstanding something?...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the benchmark examples in encodedecode_json.js and encodedecode.js, then inspect the README to see whether benchmark results are documented there. Clarify whether the measured comparison is valid and what results or explanation should be added before updating the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
documentation, performance
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.