英文160
6 Chapter 1: A Python Q&A Session
So, is Python a scripting language or not? It depends on whom you ask. In general, the
term "scripting" is probably best used to describe the rapid and flexible mode of development
that Python supports, rather than a particular application domain.
OK, but What's the Downside?
After using it for 21 years, writing about it for 18, and teaching it for 16, I've found that
the only significant universal downside to Python is that, as currently implemented, its
execution speed
may not always be as fast as that of fully compiled and lower-level
languages such as C and C++. Though relatively rare today, for some tasks you may
still occasionally need to get "closer to the iron" by using lower-level languages such
as these that are more directly mapped to the underlying hardware architecture.
We'll talk about implementation concepts in detail later in this book. In short, the
standard implementations of Python today compile (i.e., translate) source code statements
to an intermediate format known as byte code
and then interpret the byte code.
Byte code provides portability, as it is a platform-independent format. However, because
Python is not normally compiled all the way down to binary machine code (e.g.,
instructions for an Intel chip), some programs will run more slowly in Python than in
a fully compiled language like C. The PyPy
system discussed in the next chapter can
achieve a 10X to 100X speedup on some code by compiling further as your program
runs, but it's a separate, alternative implementation.
So, is Python a scripting language or not? It depends on whom you ask. In general, the
term "scripting" is probably best used to describe the rapid and flexible mode of development
that Python supports, rather than a particular application domain.
OK, but What's the Downside?
After using it for 21 years, writing about it for 18, and teaching it for 16, I've found that
the only significant universal downside to Python is that, as currently implemented, its
execution speed
may not always be as fast as that of fully compiled and lower-level
languages such as C and C++. Though relatively rare today, for some tasks you may
still occasionally need to get "closer to the iron" by using lower-level languages such
as these that are more directly mapped to the underlying hardware architecture.
We'll talk about implementation concepts in detail later in this book. In short, the
standard implementations of Python today compile (i.e., translate) source code statements
to an intermediate format known as byte code
and then interpret the byte code.
Byte code provides portability, as it is a platform-independent format. However, because
Python is not normally compiled all the way down to binary machine code (e.g.,
instructions for an Intel chip), some programs will run more slowly in Python than in
a fully compiled language like C. The PyPy
system discussed in the next chapter can
achieve a 10X to 100X speedup on some code by compiling further as your program
runs, but it's a separate, alternative implementation.
Last one:26字母
Next one:写给2020年的自己
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
Hot degree:☆☆☆☆☆
Difficulty:☆☆☆☆☆
quality:☆☆☆☆☆
Description: the system according to the heat, the difficulty, the quality of automatic certification, the certification of the article will be involved in typing!
This paper typing ranking TOP20
登录后可见
用户更多文章推荐
- 中文3252019-05-03
- 英文3172019-04-29
- 英文3162019-04-29
- 英文3132019-04-15
- 英文3052019-04-08
- 英文2952019-03-19
- 英文2902019-03-10
- 英文2852019-03-06
- 英文2752019-02-27
- 英文2702019-02-20
- 英文2652019-02-11
- 中文2502019-02-03
- 英文2502019-02-02
- 英文2452019-01-30
- 英文2402019-01-28
- 英文2392019-01-28
- 英文2362019-01-28
- 英文2292019-01-17
- 英文1852018-10-21
- 中文1502018-09-08