Skip to content

Commit c2c3943

Browse files
committed
profiling: Small fix to one of the code blocks
1 parent d475105 commit c2c3943

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

content/profiling.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ Let's run this with `%%time`-magic and ten million throws:
247247
%%timeit
248248
calculate_pi(10_000_000)
249249
```
250+
250251
```{code-block} console
251252
1.07 s ± 30.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
252253
```
@@ -268,18 +269,6 @@ def calculate_pi(n_darts):
268269
pi = 4 * hits / n_darts
269270
return pi
270271
271-
30000742 function calls (30000736 primitive calls) in 4.608 seconds
272-
273-
Ordered by: internal time
274-
List reduced from 150 to 5 due to restriction <5>
275-
276-
ncalls tottime percall cumtime percall filename:lineno(function)
277-
4 2.545 0.636 4.005 1.001 {built-in method time.sleep}
278-
20000000 1.091 0.000 1.091 0.000 {method 'random' of '_random.Random' objects}
279-
10000000 0.571 0.000 0.571 0.000 {built-in method math.sqrt}
280-
3 0.172 0.057 0.270 0.090 {method 'poll' of 'select.epoll' objects}
281-
1 0.148 0.148 0.233 0.233 <string>:1(calculate_pi)
282-
283272
calculate_pi(10_000_000)
284273
```
285274

0 commit comments

Comments
 (0)