Comparing Programming Languages in Google Code Jam
Examensarbete för masterexamen
Computer science – algorithms, languages and logic (MPALG), MSc
When developing software there are different requirements for what the software needs to deliver. In some cases raw speed performance is the most important factor, while in other cases achieving reusable design is more important. Regardless of the different implementation approaches that can be used, the programming language is likely to affect whether the requirements are met. Thus, knowing how to choose the optimal programming languages for a specific software project is an important task. The goal of this study is to identify weakness and strengths of some popular programming languages based on how they are used in practice by professional programming contestants. This study empirically examines five programming languages: C, C#, C++, Python and Java. The characteristics of the languages are studied using data developed independently of this study, namely programs submitted as entries in the programming competition Google Code Jam (GCJ). Entries to the contest were downloaded, compiled and executed to measure features of interest such as: lines of code, size of executable file, run time and memory consumption, as well as each entry’s final rank in the competition. Furthermore how self contained the languages are is studied using error messages received execution. The study found no language that is superior in all features. C and C++ give great raw speed performance and use memory most efficient. C# and Java have slower performance and larger footprint compared to C and C++, but provide small executables. Python emerges as reasonable alternative to C and C++.
Data- och informationsvetenskap , Computer and Information Science