How to Make a Fast Dynamic Language Interpreter
A bilingual English story with sentence-by-sentence Chinese (Simplified) translation. Level: BEGINNER (CEFR). Tap any word in the DuoBook reader for an instant translation.
Li Ming is a young programmer who likes to learn new programming languages.
李明是一位年轻的程序员,他喜欢学习新的编程语言。
He recently found a new language called Zef and was very interested in how it was implemented.
他最近发现了一个叫做 Zef 的新语言,并对它的实现方式很感兴趣。
He wanted to know why the interpreter for the Zef language ran so fast.
他想知道为什么 Zef 语言的解释器运行得如此之快。
Li Ming searched online for 'How to Make a Fast Dynamic Language Interpreter'.
李明在网上搜索“如何制作一个快速的动态语言解释器”。
He read some articles about interpreter design and optimization.
他读到了一些关于解释器设计和优化的文章。
He learned that an interpreter is a program that translates code from a programming language into machine code that a computer can understand, line by line.
他了解到,解释器是将一种编程语言的代码逐行翻译成计算机可以理解的机器代码的程序。
To make an interpreter run fast, careful design and some techniques are needed.
要让解释器运行得快,需要仔细的设计和一些技巧。
Li Ming started trying to build a simple interpreter for the Zef language.
李明开始尝试为 Zef 语言构建一个简单的解释器。
He learned how to parse the code, breaking it down into smaller parts.
他学习了如何解析代码,将其分解成更小的部分。
Then, he needed to translate these parts into instructions that the computer could execute.
然后,他需要将这些部分转换成计算机可以执行的指令。
Li Ming found that using a data structure called an 'abstract syntax tree' could help him organize the code better.
李明发现,使用一种叫做“抽象语法树”的数据结构可以帮助他更好地组织代码。
He was also researching how to use 'Just-In-Time' (JIT) compilation techniques to further improve speed.
他还在研究如何使用“即时编译”(JIT)技术来进一步提高速度。
JIT can compile parts of the code into machine code while the program is running, making it faster the next time it runs.
JIT 可以在程序运行时将一部分代码编译成机器码,这样下次运行时就会更快。
Although there was still a lot to learn, Li Ming was happy with his progress.
虽然还有很多需要学习的,但李明对自己的进展感到满意。
He believed he could make a fast and efficient Zef language interpreter.
他相信自己能够做出一个快速而有效的 Zef 语言解释器。
Vocabulary (English)
- 程序员
- programmer
- 编程语言
- programming language
- 解释器
- interpreter
- 实现
- implementation
- 优化
- optimization
- 机器代码
- machine code
- 解析
- parse
- 转换
- translate
- 抽象语法树
- abstract syntax tree
- 数据结构
- data structure
- 即时编译
- Just-In-Time compilation
- 技术
- techniques
- 有效
- efficient
More English stories
- Fransa istenmeyen pazarlama aramalarını yasakladı - BBC News Türkçe (Intermediate)
- cua/blog/gpu-passthrough-macos-vms.md at main · trycua/cua (Beginner)
- Fransa'da denizanası sürüsü nedeniyle 3 nükleer reaktörün faaliyetleri durduruldu (Intermediate)
- Imported content adaptation: Anne Hathaway (Intermediate)
- Amber heat health alerts to kick in across England ahead of fifth summer heatwave – latest news (Beginner)
- Live Updates: Trump says U.S. only (Beginner)
Create your own bilingual story on DuoBook · Explore more stories