caiogondim / fast-memoize.js

:rabbit2: Fastest possible memoization library

Home Page:https://npm.im/fast-memoize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON.stringify

FlynnLeeGit opened this issue · 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 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 =)

@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.

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