Presentation is loading. Please wait.

Presentation is loading. Please wait.

C++ vs. Python By Jahrain Jackson Home Institution: University of Hawaii at Hilo Internship: Subaru Telescope Mentor: Matt Dinkins.

Similar presentations


Presentation on theme: "C++ vs. Python By Jahrain Jackson Home Institution: University of Hawaii at Hilo Internship: Subaru Telescope Mentor: Matt Dinkins."— Presentation transcript:

1 C++ vs. Python By Jahrain Jackson Home Institution: University of Hawaii at Hilo Internship: Subaru Telescope Mentor: Matt Dinkins

2 2 The Problem The Subaru Software Development team (SSD) is migrating their instrument control software from C/C++ to Python. Lack of performance comparisons directly between the two languages. Information on performance impacts from migrated code is needed.

3 3 My Project Write performance benchmarking software in both C/C++ and Python. Execute software on Subaru’s Real Time System (AO188RTS) Construct a Wiki page on Subaru’s Wiki to present an analysis on the results.

4 4 Why Python? C++Python Complex syntax Difficult to read Minimal Syntax Easier to read and debug Faster development time Increases productivity

5 5 Compiled vs. Interpreted C++ is a compiled language. Code is translated from a human readable text form into an executable form that a machine can read. Compiled code is hardware specific. Python is an interpreted language. Code is translated into a machine readable form during run time by an interpreter application. Interpreted code run on any platform with the interpreter installed.

6 6 Benchmarking Suite Output GUI

7 7 Testing Environment AO188RTS - Subaru’s Real Time System for controlling the adaptive optics equipment 4x Intel Xeon 2GHz Processors RedHawk 4 Linux Python v2.3, GCC v3.4.6 (outdated)‏ Real Time System – A specialized computer set up for software to respond immediately with minimal interference from other processes.

8 8 Results - The Good SearchingSorting C++ Python (Shorter is better)‏ Runtime (ms)‏

9 9 Results – The Bad C++ PythonJitter Vector Normalization

10 10 Results – The Ugly C++ PythonJitter Matrix Inversion

11 11 Conclusions Python ran an average of 4x slower than C++ in averaging all test results. Runtime jitter is more important for real-time applications than average execution times. Mathematical, memory intensive, or complex algorithms suffer the biggest performance impacts in Python. Utilizing Pythons built in methods or external modules can produce near or better than C++ performance.

12 12 Acknowledgements Matt Dinkins – Project director and Python and Linux guru, helped me learn allot about Python and operating Linux systems. Subaru Telescope – For the internship opportunity and facilitating our research with the usage of their computers and equipment. Akamai Internship Program – Hosting and organizing my internship at Subaru Telescope. The Akamai Internship Program is funded by the Center for Adaptive Optics through its National Science Foundation Science and Technology Center grant (#AST ).


Download ppt "C++ vs. Python By Jahrain Jackson Home Institution: University of Hawaii at Hilo Internship: Subaru Telescope Mentor: Matt Dinkins."

Similar presentations


Ads by Google