Add benchmark results compared to JSON to README?
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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