Show More
@@ -1235,22 +1235,25 b' class ExecutionMagics(Magics):' | |||||
1235 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s |
|
1235 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s | |
1236 | Wall time: 0.00 |
|
1236 | Wall time: 0.00 | |
1237 |
|
1237 | |||
1238 | Note that the time needed by Python to compile the given expression |
|
|||
1239 | will be reported if it is more than 0.1s. In this example, the |
|
|||
1240 | actual exponentiation is done by Python at compilation time, so while |
|
|||
1241 | the expression can take a noticeable amount of time to compute, that |
|
|||
1242 | time is purely due to the compilation: |
|
|||
1243 |
|
1238 | |||
1244 | In [5]: %time 3**9999; |
|
1239 | .. note:: | |
1245 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s |
|
1240 | The time needed by Python to compile the given expression will be | |
1246 | Wall time: 0.00 s |
|
1241 | reported if it is more than 0.1s. | |
1247 |
|
1242 | |||
1248 | In [6]: %time 3**999999; |
|
1243 | In the example below, the actual exponentiation is done by Python | |
1249 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s |
|
1244 | at compilation time, so while the expression can take a noticeable | |
1250 | Wall time: 0.00 s |
|
1245 | amount of time to compute, that time is purely due to the | |
1251 |
|
|
1246 | compilation:: | |
1252 | """ |
|
|||
1253 |
|
|
1247 | ||
|
1248 | In [5]: %time 3**9999; | |||
|
1249 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s | |||
|
1250 | Wall time: 0.00 s | |||
|
1251 | ||||
|
1252 | In [6]: %time 3**999999; | |||
|
1253 | CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s | |||
|
1254 | Wall time: 0.00 s | |||
|
1255 | Compiler : 0.78 s | |||
|
1256 | """ | |||
1254 | # fail immediately if the given expression can't be compiled |
|
1257 | # fail immediately if the given expression can't be compiled | |
1255 |
|
1258 | |||
1256 | if line and cell: |
|
1259 | if line and cell: |
General Comments 0
You need to be logged in to leave comments.
Login now