8 Asynchronous Python with Rust
This chapter covers
- Writing computationally expensive applications in Python
- Improving the performance of applications by using threads
- Externalizing a module in Rust to increase asynchronous performance in Rust to scale
Python is the ultimate prototyping language. It holds this title due to its simplicity and flexibility. Designed by Guido van Rossum in the 1980s and released in 1991, its original aim was to build a better programming language (a successor to a language known as ABC). What van Rossum developed first was an interpreter and runtime for the language; then, he slowly designed the first versions of Python. From there, people started to see the power in a language that was easy to read and write. By forcing developers to use indention for code blocks, Python automatically provides some structure to an application’s source code. Since it is an interpreted language, developers can see quickly whether their application works as intended without the need to compile their code, which, on large projects, can take time. Python became beloved by many as it grew, and it still is today. The flexibility and simplicity of the language have lowered the barrier to entry for those in academic and research fields, and thus many research projects and production systems run on Python. This has led to a plethora of mathematics and simulation libraries that are used in developing ML models and data mining.