LPython: Novel, Fast, Retargetable Python Compiler

Ubaid Shaikh (~ubaid7)


4

Votes

Description:

Abstract

Python has long been favored for its simplicity, productivity, and versatile ecosystem. However, when it comes to performance-critical tasks and numerical computing, the trade-off between ease of use and execution speed has been a challenge. Enter LPython, an open-source Python compiler that revolutionizes the way we harness Python's power.

Description

In this talk, we will explore the fascinating world of LPython, a cutting-edge Python compiler that leverages type annotations to produce optimized machine code. The session will delve into the unique features and benefits of LPython, as well as demonstrate its seamless interoperability with CPython.

Outline of the talk:

  • Introduction (2 minutes)

    • Welcome and brief introduction of the speaker.
    • Overview of the talk's agenda and what attendees can expect to learn.
  • What is LPython? (2 minutes)

    • Explaining LPython as an open-source Python compiler.
    • How it compiles type-annotated Python code into optimized machine code.
    • Differentiating LPython from traditional Python interpreters.
  • Abstract Syntax Tree (AST) and Abstract Semantic Representation (ASR) (2 minutes)

    • Exploring the concept of AST and ASR and their role in LPython.
    • Understanding how ASR facilitates independent optimizations (using ASR passes) and enhances compiler capabilities.
  • Backends (4 minutes)

    • Understanding the available backends (LLVM, C, C++, WASM) in LPython.
  • Online Demo (4 minutes)

    • Live demo of code compilation using LPython in browser.
    • Showcase AST, ASR, C, WAT (WebAssembly Text Format) output tabs on the website.
  • Ahead-of-Time (AoT) and Just-In-Time (JIT) Compilation (2 minutes)

    • Differentiating between AoT and JIT compilation in LPython.
    • Explaining how AoT generates binary output and JIT translates code during runtime.
  • Interoperability with CPython (2 minutes)

    • Discussing how LPython allows seamless integration with CPython libraries.
    • Showcasing the @pythoncall decorator and its practical applications (Matplotlib for graphs and Mandelbrot Set).
  • Speed and Performance Benchmarks (2 minutes)

    • Presenting performance benchmarks comparing LPython against C++.
    • Showcasing LPython's efficiency in numerical and array-oriented computations.
  • Conclusion and Takeaways (2 minutes)

    • Summarizing the key points covered in the talk.
    • Encouraging attendees to embrace LPython for their projects.
  • Q&A Session (5 minutes)

    • Allowing attendees to ask questions related to LPython, its features, and practical implementations.
    • Engaging in discussions and providing clarifications as needed.
  • Closing Remarks (1 minute)

    • Expressing gratitude to the audience for their participation.
    • Sharing contact information and additional resources for further exploration.

Expected Takeaways:

Attendees will walk away with a comprehensive understanding of LPython's capabilities, its role in enhancing Python's performance, and the practical steps to integrate LPython into their projects. They will be inspired to leverage the strengths of LPython for blazingly fast computations without sacrificing Python's user-friendly features.

Prerequisites:

Basic Python experience would be helpful.

Speaker Info:

Ubaid Shaikh received his B.Tech degree in Computer Science and Engineering from Indian Institute of Technology Indore, India.

He is currently a Compiler Developer at GSI Technology working on LPython and LFortran Compilers. In the past, he has interned at Development Bank of Singapore (DBS Bank) and has been a Google Summer of Code (GSoC) Fellow.

Speaker Links:

GitHub: https://github.com/Shaikh-Ubaid

Email: shaikhubaid769@gmail.com

Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: