Exploring the Trade-Off between Language Simplicity and Execution Efficiency: A Study Using Crython and LLVM

Authors

  • Soham Malakar Post Graduate and Research Department of Computer Science, St. Xavier’s College (Autonomous), Kolkata, West Bengal, India Author
  • Sreekanya Pal Post Graduate and Research Department of Computer Science, St. Xavier’s College (Autonomous), Kolkata, West Bengal, India Author
  • Nazlee Rahman Post Graduate and Research Department of Computer Science, St. Xavier’s College (Autonomous), Kolkata, West Bengal, India Author
  • Asoke Nath Post Graduate and Research Department of Computer Science, St. Xavier’s College (Autonomous), Kolkata, West Bengal, India Author

DOI:

https://doi.org/10.32628/CSEIT25113379

Keywords:

Programming Language Design, Syntax Simplicity, LLVM Code Generation, Pratt Parser, Performance Benchmarking, Python-like Syntax

Abstract

Contemporary programming languages often pose a challenge due to either complex syntax or performance limitations, especially in dynamically typed environments. The language proposed in this paper, Crython, aims to mitigate these challenges by offering a beginner-friendly, Python-like syntax combined with performance that approaches that of C. It is built with a custom lexer, employs a Pratt parser for expression handling, and uses a Recursive Descent parser for statements. Code generation is powered by LLVM, leveraging its robust toolchain to simplify backend implementation and deliver high execution speed. While the syntax is intentionally similar to Python to facilitate ease of adoption, it also addresses certain ambiguities and inconsistencies found in Python’s design. The paper includes performance benchmarks across multiple languages to demonstrate the efficiency and competitiveness of the proposed language.

Downloads

Download data is not yet available.

References

A. V. Aho and J. D. Ullman, Principles of compiler design. New Delhi, India: Narosa Publ. House, 1999.

“6. Expressions — Python 3.10.7 documentation,” docs.python.org. https://docs.python.org/3/reference/expressions.html#operator-precedence

V. R. Pratt, “Top down operator precedence,” Proceedings of the 1st annual ACM SIGACT-SIGPLAN symposium on Principles of programming languages - POPL ’73, 1973, doi: https://doi.org/10.1145/512927.512931.

“User guide — llvmlite 0.45.0dev0+224.g2fbac84.dirty documentation,” Readthedocs.io, 2015. https://llvmlite.readthedocs.io/en/latest/user-guide/index.html

“The Go Programming Language Specification - The Go Programming Language,” Go.dev, 2024. https://go.dev/ref/spec#Semicolons

“7. Simple statements,” Python documentation. https://docs.python.org/3/reference/simple_stmts.html#the-global-statement

C. Lattner and V. Adve, “LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation.” Accessed: May 22, 2025. [Online]. Available: https://www.llvm.org/pubs/2004-01-30-CGO-LLVM.pdf

“Chunks of Bytecode Crafting Interpreters,” Craftinginterpreters.com, 2015. https://craftinginterpreters.com/chunks-of-bytecode.html#bytecode (accessed May 22, 2025).

Craftinginterpreters.com, 2025. https://craftinginterpreters.com/a-virtual-machine.html#design-note (accessed May 23, 2025).

C. Ye, Z. Shen, Y. Wu, and P. Loskot, “Reconsidering Python Syntax to Enhance Programming Productivity,” International Journal for Research in Applied Science and Engineering Technology, vol. 12, no. 3, pp. 776–785, Mar. 2024, doi: https://doi.org/10.22214/ijraset.2024.58903.

“ctypes — A foreign function library for Python — Python 3.9.5 documentation,” docs.python.org. https://docs.python.org/3/library/ctypes.html

H.-J. Boehm and M. Weiser, “Garbage collection in an uncooperative environment,” Software: Practice and Experience, vol. 18, no. 9, pp. 807–820, Sep. 1988, doi: https://doi.org/10.1002/spe.4380180902.

Downloads

Published

15-06-2025

Issue

Section

Research Articles