58
edits
Changes
→Reference
{{GPU621/DPS921 Index | 20207}}
[mailto:astinziani@myseneca.ca?subject=GPU621 Yuseok Won]
[mailto:astinziani@myseneca.ca?subject=GPU621 Minsu Kim]
== Progress Charts=={| <!-- The nested table must be on a new line -->| style="border: 2px" |{| class="wikitable"|+ Performance difference in Go & Java|-! !! Go !! Java|-| Main thread|| 84.66 s|| 171.76 s|-| 1 thread|| 84.28 s || 169.51 s|-| 2 thread|| 37.08 s|| 73.04 s|-| 4 thread|| 19.2 s || 34.91 s|-| 8 thread|| 11.41 s|| 17.63 s|-| 16 thread|| 14.38 s|| 16.08 s|}
| style="padding: 15px;" |
[[File:Parallel Programming in Go & Java.png|400px]]
|} {| <!-- The nested table must be on a new line -->| style="border: 2px" |{| class== What's GO Language? === "wikitable" margin-left: left;|+ Performance difference for Java Thread|-! !! difference|-| Main Thread to 1 thread|| 2.25%|-| 1 thread to 2 threads|| 56.91%|-| 2 threads to 4 threads|| 51.90%|-Go Language is a open source programming language that is designed at Google by [https://en| 4 threads to 8 threads|| 49.wikipedia49%|-| 8 threads to 16 threads|| 8.org/wiki/Robert_Griesemer Robert Griesemer], [https79%|} | style="padding: 15px;" | {| class="wikitable" margin-left://enleft;|+ Performance difference for Go Thread|-! !! difference|-| Main Thread to 1 thread|| 0.wikipedia45%|-| 1 thread to 2 threads|| 127.org/wiki/Ken_Thompson Ken Thompson], and [https://en30%|-| 2 threads to 4 threads|| 93.wikipedia12%|-| 4 threads to 8 threads|| 68.org/wiki/Rob_Pike Rob Pike]27%|-| 8 threads to 16 threads|| -20. [[File65%|}|style="padding:Golang.png15px;"|400px{|right]] <br>class="wikitable"|+ Performance increase of Go lang is a '''Fast''' and '''Pretty''' languagein comparsion to Java Thread|-! !! difference|-| Main thread|| 102%|-| 1 thread|| 101%|-| 2 thread|| 96.90%|-| 4 thread|| 81.80%|-| 8 thread|| 55%|-| 16 thread|| 12%|} |} ==Analysis== The results of matrix multiplication implementation on Go language is a compiler has remarkable superiority in main thread. However, the both language which makes its shows the tendency that execution time gradually decreases as the number of threads increase. The curve of execution fasttime on the graph become flatten for both Go and Java when the number of threads become 8 and 16. We infer the Go also has a relatively easy syntax reduction tendency when the number of threads reach 8 and 16 but Java shows the promotion tendency as number of threads reach 8 and 16. The best performance has been shown that the 8 threads for Go and 16 threads on Java. The percentage difference of implementation time between GO and Java shows minimum 12% when 16 threads being used and maximum 102% when main thread being used. There is a few possible reason that Go and Java shows difference performance despite using same calculating matrix multiplication algorithm. First, the code for Go and Java is not exactly matched. second, Java uses JVM(Java Virtual Machine) to calculate the algorithm which makes it easy to learn and fast may take more time to developimplement.
=Reference== What's Javahttps://golang.org/doc/faq#goroutines <br>https://docs.oracle.com/javase/tutorial/essential/concurrency/highlevel.html<br>http://www.oracle.com/technetwork/java/javase/overview/javahistory-index-198355.html<br>https://golang.org/doc/faq#Origins<br>https://www.youtube.com/watch? v===oV9rvDllKEg<br>https://stackoverflow.com/questions/1050222/what-is-the-difference-between-concurrency-and-parallelism<br>https://onlinenumbertools.com/random-number-matrix<br>https://golang.org/dl/<br>https://www.java.com/ko/download/manual.jsp<br>https://docs.oracle.com/javase/tutorial/essential/concurrency/executors.html