LPython
High performance typed Python compiler
LPython is a Python compiler that aims to provide optimized machine code by compiling type-annotated Python code. It offers several backends, including LLVM, C, C++, and WASM, which allow it to generate code into multiple target languages simultaneously. LPython’s main focus is on speed and performance, and it achieves this through various features and optimizations.
LPython is still in development (alpha stage) and may evolve further to encompass more extensive Python code and additional optimizations. LPython: Novel, Fast, Retargetable Python Compiler.
새로운 고속 Python 컴파일러
Features
- 타입 주석이 있는 Python 코드를 최적화된 코드로 컴파일하는 컴파일러
- 기계어(LLVM), C, C++, WASM 등 여러 백엔드 지원
- 기기 독립적인(Machine Independent) 코드 최적화
- AoT(Ahead-of-Time) 컴파일 외에도 @lpython 데코레이터 추가를 통한 JIT(Just-In-Time) 컴파일 지원
- CPython과의 상호 운용성을 제공하여, NumPy/TensorFlow/PyTorch/Matplotlib 등 기존 라이브러리 및 도구를 그대로 사용 가능
- 최적화 플래그를 적용한 빌드 결과물로 각종 알고리즘 벤치마크를 실행한 결과, 경쟁력 있는 실행시간을 보여줌
- 아직 알파 버전이므로 버그 있을 수 있음
- 오픈소스(BSD 라이선스)