C, C++, Java och Python: En prestandajämförelse mellan fyra programmeringsspråk
Independent thesis Basic level (degree of Bachelor)Student thesisAlternative title
C, C++, Java and Python : A performance comparison of four programming languages (English)
In today’s society computers are getting a much more important role. To get a computer to work as intended it has to be programmed. A computer program is written with programming languages. There is an abundance of programming languages available today and there are many differences and similarities between them. The different languages have their advantages and their disadvantages where some of them are intended for fast performance, some to be cheap on memory usage, and some are developed to be easy to program on. In our thesis we have chosen to compare four of todays most common languages, C, C++, Java and Python. These languages were chosen because we have worked with three of them during our study period (C, C++ and Java). Python was chosen because it is an interpreted language and not a compiled one. It also have a very different syntax compared to the other languages which makes it interesting. Our comparison, which focuses on performance, has its foundation in the tests we have made, but also on results from a research survey that we also made. I this survey forty software developers, from Swedish companies, have participated. The tests we have made measure the languages performance, regarding time, by implementing and running two common algorithms. During these tests vi have also chosen to register the amount of memory these algorithms use during runtime. The results we have extracted from our tests and our survey are compiled, and these results are then analysed to be able to compare the four programming languages to each other. The tests that have been done show that Java is the language that performs best, with C and C ++ second best and then Python performing the worst. Our survey answers, on the other hand, indicates that C and C++ should have outperformed Java.
Place, publisher, year, edition, pages
2011. , 62 p.
Programming language, comparison, Java, C, C++, Python, performance
Computer Science Software Engineering
IdentifiersURN: urn:nbn:se:bth-2304Local ID: oai:bth.se:arkivex070E90E96E13E01FC12578C3006641A3OAI: oai:DiVA.org:bth-2304DiVA: diva2:829573