Changes

Jump to: navigation, search

GPU621/Go Parallel

5,154 bytes added, 21:15, 19 November 2020
no edit summary
=== Concurrency and Parallelism ===Go was designed for concurrency. “Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once.” [https://blog.golang.org/waza-talk] - Rob Pike (One of the programmers of Go). Concurrency is '''NOT''' parallel programming.
Quoting [https://docs.oracle.com/cd/E19455-01/806-5257/6je9h032b/index.html Sun's ''Multithreaded Programming Guide''] on the Oracle Documentation website -  '''Parallelism''' is defined as:  Parallelism - A condition that arises when at least two threads are executing simultaneously. While '''Concurrency''' is defined as:  Concurrency - A condition that exists when at least two threads are making progress. A more generalized form of parallelism that can include time-slicing as a form of virtual parallelism. ====But what about Go? = Parallelism === As stated above, Concurrency is '''NOT''' parallel programming. But working with both is very easy to do in Go. A big thing to note about Go is the 'goroutines' which is what allow programmers to run functions or methods concurrently.  go function_name(parameters) Using the key term 'go' allows the program to run concurrently, '''BUT''' in order for your program to run in parallel you can use the key term 'GOMAXPROCS'  func GOMAXPROCS(n int) int 'GOMAXPROCS' allows the programmer to specify the '''MAX''' amount of CPU's that will be executing code simultaneously. By default, GOMAXPROCS is set to the number of cores available.  If you're more interested in the differences between Concurrency and Parallelism we found a great explanation here: https://stackoverflow.com/a/24684037/8644993
== Differences ==
== Relevance ==
=== Present and Future === Presently C++ is a language that is so intertwined with programming it would be hard for any language to surpass it in terms of relevance. Many systems/programs depend on C++ for core functionality and because the technology world moves/evolves so quickly it is hard for programmers to transfer systems over to a new language without encountering major issues. ==== But what do the people say? ====But that doesn't mean that Go isn't used today, on Tiobes Programming Language Index [https://www.tiobe.com/tiobe-index/] C++ is currently in fourth place, Go is 13th. The difference? C++ hasn't made any movement from 4th place for an entire year, while Go last year of November 2019 was at the 20th place, It has gone up 7 places in just 1 year.
Stack Overflow has also released their 2020 Developer Survey[https://insights.stackoverflow.com/survey/2020] and the results show that currently for the most loved languages, Go is in 5th place and C++ is 18th. In terms of popularity C++ is 10th place while Go is 12th. And obviously major companies have already begun incorporating Go into their projects such as Google, YouTube, Uber, Intel, and Heroku. === Future =What's the future like? ====The future looks bright for Go and it's gaining traction quick. Since it's a language that was literally meant to be a replacement for these older languages like C++ it definitely has the edge when incorporating new technologies that are introduced because of hardware advancements (Such has multi-core CPU's).
== Pros and Cons ==
=== Pros over CPP ===1. Tons of support
2. Ease of use 3. Major companies support it (Google) 4. Better security integrations === Cons over CPP ===1. Lack of versatility 2. Young language 3. Lacks speed compared to C++ (But is much faster than other high-level languages) 4. Smaller Community  More about the pros and cons can be found at: https://www.geeksforgeeks.org/go-vs-c-plus-plus/
== Why should you Go Parallel? ==
 
While currently C++ is generally a better language to learn parallel programming concepts from, and is also more used within the programming industry. Go is gaining popularity quickly and with the creation of Go meant to improve upon C++ weaknesses the future of Go is looking very good. Parallel programming in Go is extremely easy and has built in support for it (No need to go through any installation https://ict.senecacollege.ca/~gpu621/pages/content/suppo.html). In addition Go is a fun language to learn and could seriously be used over many of the other high-level programming languages.
 
 
A major thing to remember is that during Go's creation, multi-core CPU's were currently being made and popularized. This is very advantageous over C++ since in 1979 multi-core CPU's were unheard of and the first multi-core CPU was introduced in 2001.
= Group Members =
Update 2: Friday, Nov 13, 2020 - Created description for Go Language
 
Update 3: Sunday, Nov 15, 2020 - Created Installation Instructions
 
Update 4: Sunday, Nov 15, 2020 - Created Pros and Cons
 
Update 5: Tuesday, Nov 17, 2020 - Created 'Why you should Go Parallel'
 
Update 6: Thursday, Nov 19th, 2020 - Added all parts of project onto project website
 
Update 7: Thursday, Nov 19th, 2020 - Added Pictures to Installation Instructions
= References =
https://golang.org/doc/faq#history
https://software.intel.com/content/www/us/en/develop/blogs/go-parallel.html
https://talks.golang.org/2012/splash.article
 
https://golang.org/pkg/runtime/#GOMAXPROCS
 
https://docs.oracle.com/cd/E19455-01/806-5257/6je9h032b/index.html
 
https://stackoverflow.com/a/24684037/8644993
 
https://www.tiobe.com/tiobe-index/
 
https://brainhub.eu/blog/biggest-companies-using-golang/
 
https://insights.stackoverflow.com/survey/2020
 
https://github.com/golang/go/wiki/GoUsers
 
https://www.geeksforgeeks.org/go-vs-c-plus-plus/
 
https://careerkarma.com/blog/go-vs-c-plus-plus/
 
http://www.cplusplus.com/info/history/
35
edits

Navigation menu