https://github.com/tsimpdim/calcpi
An attempt to calculate Pi accurately and efficiently.
https://github.com/tsimpdim/calcpi
distributed distributed-computing distributed-lock java multithreading pi-calculator
Last synced: 12 months ago
JSON representation
An attempt to calculate Pi accurately and efficiently.
- Host: GitHub
- URL: https://github.com/tsimpdim/calcpi
- Owner: TsimpDim
- Created: 2019-05-16T10:42:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-24T08:40:02.000Z (about 7 years ago)
- Last Synced: 2025-05-20T01:42:01.654Z (about 1 year ago)
- Topics: distributed, distributed-computing, distributed-lock, java, multithreading, pi-calculator
- Size: 14.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# CalcPi
An attempt to calculate Pi accurately and efficiently.
## Branches:
#### Solution 1
GlobalSharedSum => Every time a sum is calculated, it is immediately added to the SharedSum (which is synchronized). *Not very efficient*
DelayedSharedSum => The local sums of each thread group are summed up locally and only when the group is finished does its sum get added to the SharedSum. *More efficient than the above*
ReductionSum => Local sums are stored in an array on which a reduction algorithm is ran (no tree).
#### Solution 2
DitrSum => Distributed model in which the clients are served one after another.
DistrSumMultConns => Distributed model in which the clients are served "at the same time" (Multi-threaded).