FlyPy: Embedding a Compiled Language into an Interpreted One to Get Maximum Performance
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
Resources
Related projects
CSEF · 2015
Combining Programming Languages to Improve Performance
ISEF · 2023
Parallel: A High-Level Programming Language for Efficient Bioinformatics Scientific and Mathematical Built-In Functions With an Easy and Flexible Syntax
ISEF · 2017
Adding Data-Aware Sort Optimizations to the Python Interpreter
ISEF · 2026
CryoFlow: A Streaming FPGA Architecture for High-Efficiency Cryogenic Electron Microscopy Reconstruction
CSEF · 2002
C vs C++
ISEF · 2017
Pyco: An Algorithmic Composer
ISEF · 2024
LinkDev: A Programming Language That Combines All Programming Languages Into One Designed To Boost Coding Experience
CSEF · 2014
A Multi-Architectural Approach to the Development of Embedded Hardware
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: Regeneron International Science and Engineering Fair