Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Programming Language Mythbusters
Senior Project Poster Day 2013 – Department of Computer and InformaAon Science – University of Pennsylvania
ANDREW BRAUNSTEIN, NICO MIHALICH, JASON MOW | Advised by MILO MARTIN, STEVE ZDANCEWIC
There exist many preconceived no3ons about how C, Java, and Go perform in various different applica3ons. Our research explores and a@empts to quan3fy exactly how the programming paradigms, data models, compiler op3miza3ons, and other ar3facts of various languages affect performance in different applica3ons. Our goals is to generate hard data to enable be@er soDware design and language decisions to be made when developing real-‐world soDware.
ABSTRACT
ü Generate Hard Evidence / Data ü Enable be@er soDware design through data ü Enable be@er language decisions through data
GOALS
LANGUAGES AND ALGORITHMS
Levenshtein Edit Distance
Fibonacci Number Genera3on
NBody Force Simula3on
NBODY DATA RECURSIVE DATA
Observa(on: gcc-‐02, gcc-‐03 unroll tail recursion into a loop causing significant performance increase in C
MEMORY USAGE DATA
Observa(on: Java always has a larger memory footprint due to the JVM, even when objects are avoided
1
10
100
1000
10000
100000
1000000
c Go Java
Average Memory Usage (over all algos) by Language (log KB)
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
OpAmized Levenshtein Edit Distance RunAme (s)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Simple Levenshtein Edit Distance RunAmes (s)
0
0.05
0.1
0.15
0.2
0.25
Fibonacci Recursive RunAme (s)
0
0.05
0.1
0.15
0.2
0.25
c (clang -‐O3) Go Java
Simple NBody RunAme (s)
0
0.05
0.1
0.15
0.2
0.25
c (clang -‐O3) Go Java
OpAmized NBody RunAme (s)
0
0.05
0.1
0.15
0.2
0.25
0.3
gcc simple gcc ptr gcc ptr2 gcc ptr3 clang simple clang ptr clang ptr2 clang ptr3
NBody C RunAme (s)
Op3miza3ons can be very fast.
Implementa(on > Language Choice