21
MEDUS A Python is no longer the big fat slow thing that you always thought it to be

The Medusa Project

Embed Size (px)

Citation preview

Page 1: The Medusa Project

MEDUSA Python is no longer the big fat slow

thing that you always thought it to

be…

Page 2: The Medusa Project

Compilers - The very things driving the software development industry.

They form the heart of every little app that comes out in the market eachsecond to the huge Operating Systems that are literally running theentire world around us.

They form the very backbone of the software development industry butmodern trends show that speed and flexibility is of the essence and moreand more development is now focused on scripting languages owing toits easy and effortless nature.

Languages like Python and Ruby provide the programmer with muchmore flexibility, diversity and viability at a much higher level ofabstraction.

However, with great power comes great responsibility.

Page 3: The Medusa Project

We address the problem of scripting languages being too slowand inefficient for large-scale deployment by creating a newplatform for the Python programming language to run in amuch faster and efficient manner allowing large scaledeployments.

Presenting Medusa. Our answer to the problem.

Page 4: The Medusa Project

To support most if not all of the base Python 2.7.3language specification.

To provide a seamless replacement for the existing Pythonsub system and maintain full compatibility with the existingcoding standards.

To achieve significant speed boosts over the traditionalPython interpreter via JIT compilation.

To rectify and create enhancements over the usual Pythoncode constructs and provide a safer, faster and moreintelligent environment for Python to run in.

Page 5: The Medusa Project

Our methodology involves the following phases:

Concept: This involves the initial brainstorming and structuring of thecode model, which is to be the final product.

Inception: Basic blocks of the model is realized and are implemented abasic level with open ends to facilitate code patching.

Construction: Actual modules are created and tested

Transition: The modules are moved to a release phase if passed elsesent back to last step.

Production: A working release version is drafted.

Page 6: The Medusa Project
Page 7: The Medusa Project

You begin with a python file

Page 8: The Medusa Project

Which gets tokenized into tokens

Page 9: The Medusa Project

The tokens are then parsed into an Abstract Syntax Tree (AST)

Page 10: The Medusa Project

Abstract Syntax Tree >>>> >>>> Optimized Dart Code

Page 11: The Medusa Project

The Dart Virtual Machine

runs the code

JIT and viola!

Hello World!

Page 12: The Medusa Project
Page 13: The Medusa Project
Page 14: The Medusa Project
Page 15: The Medusa Project

YESSS! IT

WORKS!

Page 16: The Medusa Project
Page 17: The Medusa Project

A program to recursively find the 36th Fibonacci Number

Page 18: The Medusa Project

Oh My! A 294% speed boost?! Impressive huh? But you

know what? WE CAN DO EVEN BETTER!

Page 19: The Medusa Project

A program to perform the Towers of Hanoi puzzle with 25 disks

Page 20: The Medusa Project

Oh Yeah! A 1237% speed boost! Medusa rocks!!

Page 21: The Medusa Project