Font Size: a A A

Comparison of sequential and parallel architectured run times for Project Euler problems

Posted on:2016-02-13Degree:M.SType:Thesis
University:University of Colorado at DenverCandidate:McLauthlin, Andrew BradfordFull Text:PDF
GTID:2478390017968162Subject:Computer Science
Abstract/Summary:PDF Full Text Request
The aim of this thesis is to take a semi random assortment of computer science problems and test solution times in serial programming (C++) vs parallel architecture programming (OpenCL) for GPU's (Graphics Processing Units). To this end, the first forty problems from Project Euler were selected as the problem set, C++ was chosen as the main serial language, and OpenCL as the parallel language. As a Java programmer at work, it seemed interesting to also attempt solutions in Java to compare C++ to Java among the same problem sets with similar solution styles. Finally, this thesis seemed a perfect candidate to present on the web for discussion among interested parties.;The conclusion of the research showed Java to be a little faster than expected. It generally was about twice as slow as C++ for any given solution, but where it did end up being faster, it was largely in file I/O and string operations.;OpenCL also was a little slower than C++ in median execution speeds and much slower in median run times, suggesting that for general problems where nothing is known about the problem, C++ is usually a better choice. However, the type of problem made a huge difference in execution speeds between the two languages. If a problem had thousands or millions of answers to check and was at all parallelizable (or was able to be massively parallel), OpenCL was incredibly fast. Similarly, if a problem was inherently serial, tiny, or even closed form, C++ won handily.;This thesis should be interesting to those who simply enjoy solving abstract problems, those who are curious about Java vs C++ speeds, those who are interested in seeing when parallel programming might beat out standard serial programming and for what types of problems that might be the case, and those who might want to see the process of optimizing a solution for a particular problem. Because of the web presentation aspect of this that allows for comments to be posted to each problem, those that are interested can (and did) contribute to the overall process and engage with the author directly.
Keywords/Search Tags:Problem, Times, Parallel, Solution
PDF Full Text Request
Related items