Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macdja38/serializationspeedtest
https://github.com/macdja38/serializationspeedtest
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/macdja38/serializationspeedtest
- Owner: macdja38
- Created: 2019-08-25T04:55:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T09:34:35.000Z (over 3 years ago)
- Last Synced: 2024-10-22T09:54:03.116Z (3 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> [email protected] test /home/runner/work/serializationSpeedTest/serializationSpeedTest
> node benchmark.js**Encoding Outputs**
toString | 529612 | 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1
toJSON | 529623 | {"data":"19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1
textDecoder | 262144 |
theLongOne | 524288 | 1313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313
**Encoding Timings**
Generate x 8,730 ops/sec ±4.28% (76 runs sampled)
Generate achieved a mean of mean 0.00011454426699640005s and a cycle speed of 8730.249240945672ops/secTo String x 77.17 ops/sec ±2.42% (66 runs sampled)
To String achieved a mean of mean 0.012958859057575756s and a cycle speed of 77.16728730184ops/secTo Buffer To String x 706,083,202 ops/sec ±2.11% (87 runs sampled)
To Buffer To String achieved a mean of mean 1.416263688027657e-9s and a cycle speed of 706083202.198482ops/secTo JSON x 69.18 ops/sec ±2.92% (71 runs sampled)
To JSON achieved a mean of mean 0.014454353940140843s and a cycle speed of 69.18330657608458ops/secText Decoder x 1,786 ops/sec ±2.44% (83 runs sampled)
Text Decoder achieved a mean of mean 0.0005599819368453495s and a cycle speed of 1785.7718869174355ops/secarray then map then toString then join x 16.17 ops/sec ±2.17% (31 runs sampled)
array then map then toString then join achieved a mean of mean 0.06182552374193548s and a cycle speed of 16.174549594987297ops/sec**Results**
Fastest is To Buffer To String
Slowest is array then map then toString then join