PART 01
写在前面的话:
All grows is a leap in the dark.
所有的成长都是黑暗中的一跃!!!!
PART 02 Python历史、32/64-bit的区别、系统运行机制浅析
一. Python历史
- 1989年,Guido开始写Python语言的编辑器。
- 1991年,第一个Python编译器诞生。它是用C语言实现的,并能够调用C语言的库文件。
- Granddaddy of Python web frameworks, Zope 1 was released in 1999 .
- Python 2.0 - October 16 , 2000年 , 加入了内存回收机制,构成了现在Python语言框架的基础。
- Python 2.4 - November 30 , 2004年 , 经典版本,同年目前最流行的web框架Djanggo(D不发音)框架 。
- Python 2.7 - July 3 , 2010年 , 目前业内主流使用的工业版本依然是2.7 。
- In November 2014 , it was announced that Python 2.7 would be supported until 2020 , and reaffirmed that there would be no 2.8 release as users were expected to move to Python 3.4+ as soon as possible .
- Python 3.0 - December 3 , 2008 .
二. 32-bit/64-bit、系统运行机制浅析
- 32位:内存的最大寻址空间是2^32 , 即4GB 。 (说明:若硬件为8GB内存,但32位只支持到4GB内存)
- 64位:理论上,内存的最大寻址空间是2^64,但实际上支持不到这么大的内存,约为2^4x,即十几TB 。
- 目前主板支持的最大内存是100多GB 。
- 硬件为4GB内存,64位的系统与32位的系统一样快。
- 操作系统也需要占用一定的内存。
- 对一台计算机的性能进行分析,最主要的三个因素:CPU、Memory(内存)、Disk(硬盘)。内存与运行速度有关,而加载速度与硬盘有关。一个软件的运行:CPU通过OS(操作系统)的接口访问硬盘,从硬盘将数据读取到Memory中进行运行。
- 硬盘:5400转=骑自行车;7200转=骑电动车;10000转=骑快速电动车;15000转=骑摩托车(机械硬盘中最快的) | SSD=Tesla
PART 03 Python版本的选择
一. What are the differences?
Short version: Python 2.x is legacy(遗产), Python 3.x is the present and future of the language
Guido van Rossum (the original creator of the Python language) decided to clean up Python 2.x properly(适当的), with less regard(不管) for backwards compatibility(兼容) than is the case for new releases in the 2.x range. The most drastic(激进