为什么一行"for"表达式在Python中更快?

신길선*_*신길선 5 python python-2.7

我测试了四种情况.

1.

testList = list()
for i in range(1000000):
    testList.append(i)
Run Code Online (Sandbox Code Playgroud)

2.

testList = list()
for i in range(1000000): testList.append(i)
Run Code Online (Sandbox Code Playgroud)

3.

testList = list()
newAppend = testList.append
for i in range(1000000): newAppend(i)
Run Code Online (Sandbox Code Playgroud)

4.

[i for i in range(1000000)]
Run Code Online (Sandbox Code Playgroud)

每次都是

1:0.09166

2:0.08299

3:0.05003

4:0.04594

为什么其他人比1快?

我能找到相关的关键词吗?