fast-memoize.js icon indicating copy to clipboard operation
fast-memoize.js copied to clipboard

JSON.stringify

Open FlynnLeeGit opened this issue 7 years ago • 5 comments

I think Json.stringify is too slow when arguments has big list object,it will take a long time to parse from object to string,in this situation, new Map() is a 10x faster than Json.stringify,maybe can change the way which strategy to choose by arguments types

FlynnLeeGit avatar Jan 28 '17 07:01 FlynnLeeGit

@FlynnLeeGit read his post https://community.risingstack.com/the-worlds-fastest-javascript-memoization-library/ he compares different serializer.

StarpTech avatar Jan 29 '17 12:01 StarpTech

@FlynnLeeGit you have data to prove your point? Please consider creating a benchmark similar to the ones on the benchmark/ folder.

Opinions without data are, well, just opinions =)

caiogondim avatar Jan 29 '17 17:01 caiogondim

What about using https://github.com/fastify/fast-json-stringify ?

Frondor avatar Sep 23 '18 18:09 Frondor

@FlynnLeeGit, just add an object version of the same benchmark that exists. It will surprise how much the performance drops when real serialization needs to occur.

planttheidea avatar Sep 23 '18 19:09 planttheidea

@Frondor That would be cool to have a benchmark with that lib. Can you do a PR?

caiogondim avatar Sep 26 '18 17:09 caiogondim