Changes

Jump to: navigation, search

DPS915/CodeCookers

1,006 bytes added, 21:34, 3 October 2014
Progress
http://www.mesham.com/article/Dartboard_PI
 
 
----
 
'''Wesley Hamilton'''
 
For assignment 1, I chose to work on a basic useful algorithm to check to see if there was the possibility to parallelize it. The algorithm takes in a numerical argument and from this number, calculates all the prime numbers from 2 to that number (since 0 and 1 are not prime). Unfortunately for whatever reason gprof could not profile it but I was able to use chrono to test run times.
 
When the target number is less than a million, the program runs in under a second. Every million items after that though took one more cumulative second then the previous. 1M = 1.104212 secs, 2M = 2.912168 secs, 3M = 5.026149 secs, 4M = 7.468770 secs, and 5M = 10.654563 secs. As you can see, while this is fairly efficient, the program could still use some help spreading the load around.
 
This seems like a pretty good candidate for a program to be parallelized as It calculates tons of numbers sequentially when ideally it could just do a bunch of them at a time sequencially.
 
----
 
=== Assignment 2 ===
=== Assignment 3 ===

Navigation menu