LoginSignup
2
2

More than 5 years have passed since last update.

msgpackのベンチマーク

Last updated at Posted at 2015-12-31

備忘録的メモ

統計表情報のjson(元のファイルサイズは71.234MB)
(msgpack化後のファイルサイズは42.732MB)

statisticsInfoObj = fse.readJsonSync("#{process.cwd()}/data/統計表情報取得2015-12-30.json")

str = JSON.stringify(statisticsInfoObj)
# json stringify: 242.443ms

buf = Buffer(str)
#buffer: 309.105ms

JSON.parse(str)
#json parse string: 693.971ms

resJsonParseBuffer = JSON.parse(buf)
#json parse buffer: 812.726ms

mspBuf = msgpack.encode(statisticsInfoObj)
#msgpack encode buffer: 1063.519ms

resMsgPackParseBuffer = msgpack.decode(mspBuf)
#msgpack parse buffer: 1345.102ms
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2