Skip to content

benckmarking the known problem of blocking JSON.stringify, a common bottleneck for NodeJS programs

Notifications You must be signed in to change notification settings

CLDH214/cpu-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpu benchmark on JSON.stringify and its alternatives.

A 524.288019 MB JSON string takes up to 100% CPU on my 3.5 GHz Quad-Core Intel Core i5 when it is being stringified with JSON.stringify.

A half sized (209.715219 MB) JSON string takes up to 100% CPU with the yieldable-json library too.

You can replicate normal JSON.stringify by

docker build -t sugar/cpu-benchmark .
docker run sugar/cpu-benchmark:latest
docker stats

You can replicate yieldable-json by

  • (make sure your toggle the Docker>preferences>Advanced memory section to be larger than 8GB first)
docker build -f Dockerfile-yieldable -t sugar/cpu-benchmark-yieldable .
docker run -m=8g sugar/cpu-benchmark-yieldable:latest
docker stats

About

benckmarking the known problem of blocking JSON.stringify, a common bottleneck for NodeJS programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published