This week we ran the first performance comparison between Lyric and native Python, and the results surprised us.
In our first performance test, Lyric version 0.5.0 completed a series of simple computation and function call benchmarks 1.33× faster than native Python, with execution times of 0.99 seconds versus 1.31 seconds respectively. (This is assuming importpy time is working correctly, which we think it is.)
Python execution time: 1.3136 seconds
Lyric execution time: 0.9891 seconds
Lyric is 1.33x faster than Python
Performance difference: 0.3245 seconds
Why Lyric Outperformed Python
- Lightweight execution: Lyric outperformed Python in early benchmarks due to its simpler interpreter, minimal runtime overhead, and limited feature set compared to Python's full dynamic machinery.
- Simplified runtime model: With fewer dynamic features and a predictable structure, Lyric’s execution path is leaner and faster.
Here are the test scripts we used for our first benchmark:
What's Next
We're excited to go live with Lyric's documentation and home page — lyric-lang.org — planned for Friday evening.
We're also preparing to release a developer preview of Lyric 0.6.0 over the weekend.
(edited)