← Back to Explore

FlyPy: Embedding a Compiled Language into an Interpreted One to Get Maximum Performance

ISEF · 2014 Embedded Systems

Overview

C, being a statically typed language is much faster than Python, but is difficult to use in development. Python, being an interpreted language is much slower than C, but is very easy to learn and use. FlyPy allows programmer to use C to deal with processing intensive calculations and then embed this code inside your Python program. When using FlyPy we don’t have to write the entire program in the difficult C environment, instead, we can use simple and concise Python to build a simple program architecture, OOP classes, etc. and embed C functions when it’s needed. For instance, Python generates the 46th number in Fibonacci’s Sequence in 427 seconds while FlyPy needs just 5.1 seconds, which is 83.7 times faster! For sorting 20000 integers using bubble-sort Python needs 38.1 seconds, FlyPy does it in just 0.7 seconds, which is 54.4 times faster! FlyPy works better than C even on fast algorithms (QuickSort), Python sorts 10^6 integers in 14.57 seconds, while FlyPy needs just 0.2 seconds. Thus, the purpose of this project is to get maximum performance by combining the most popular language (Python) with the fastest one, C to allow programmers write C functions inside Python environment.

Competition history

  • ISEF 2014 Embedded Systems · Entry CS010

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Source: Regeneron International Science and Engineering Fair

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. Browsing stays public.

Continue with Google