Show More
@@ -1244,11 +1244,15 b' python-profiler package from non-free.""")' | |||||
1244 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s |
|
1244 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s | |
1245 | Wall time: 0.00 |
|
1245 | Wall time: 0.00 | |
1246 |
|
1246 | |||
1247 | Note that the time needed by Python to compile the given expression |
|
1247 | ||
1248 | will be reported if it is more than 0.1s. In this example, the |
|
1248 | .. note:: | |
1249 | actual exponentiation is done by Python at compilation time, so while |
|
1249 | The time needed by Python to compile the given expression will be | |
1250 | the expression can take a noticeable amount of time to compute, that |
|
1250 | reported if it is more than 0.1s. | |
1251 | time is purely due to the compilation: |
|
1251 | ||
|
1252 | In the example below, the actual exponentiation is done by Python | |||
|
1253 | at compilation time, so while the expression can take a noticeable | |||
|
1254 | amount of time to compute, that time is purely due to the | |||
|
1255 | compilation:: | |||
1252 |
|
1256 | |||
1253 | In [5]: %time 3**9999; |
|
1257 | In [5]: %time 3**9999; | |
1254 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s |
|
1258 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s | |
@@ -1259,7 +1263,6 b' python-profiler package from non-free.""")' | |||||
1259 | Wall time: 0.00 s |
|
1263 | Wall time: 0.00 s | |
1260 | Compiler : 0.78 s |
|
1264 | Compiler : 0.78 s | |
1261 |
|
|
1265 | """ | |
1262 |
|
||||
1263 | # fail immediately if the given expression can't be compiled |
|
1266 | # fail immediately if the given expression can't be compiled | |
1264 |
|
1267 | |||
1265 | if line and cell: |
|
1268 | if line and cell: |
General Comments 0
You need to be logged in to leave comments.
Login now