Socket
Socket
Sign inDemoInstall

distributed-game-of-life

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    distributed-game-of-life

GOL(game of life) done in distributed manner


Version published
Weekly downloads
3
increased by50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#WAT

Run your js in multithreaded!. Harness up to 100% CPU power. GOL done in distributed manner,

#HOW

Install node and npm, node-gyp, bower and git, then:

npm i --save gol npm start and wait till 10 workers will do the job

change first line of index.js to use 2 workers and observe that it takes twice more time to calculate the world

##Benchmark of calculations of game of life

10 workes
vs 100times x 2xrecalculate x 100xpartsOfWolrd
1: 6617ms
1: 5957ms
1: 5870ms
1 worker (single thread)
vs 100times x 2xrecalculate x 100xpartsOfWolrd
1: 22223ms
1: 23846ms
1: 24604ms

speedup

generally on 4 actual cores one can expect speedup of 3.9 times

#HOW

Change first line from 10 to 2 workers and run the script

you know the drill

    git clone
    cd
    npm install
    node index.js

Keywords

FAQs

Last updated on 14 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc