Skip to content

Commit 27b90be

Browse files
committed
Line profiler
1 parent e1171ef commit 27b90be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,8 @@ timeit('"-".join(str(a) for a in range(100))',
14131413
# $ pip3 install line_profiler
14141414
@profile
14151415
def main():
1416-
a = [(i%3 + 1) * 3 for i in range(10000)]
1417-
b = [i ** (i/10000) for i in range(10000)]
1416+
a = [*range(10000)]
1417+
b = {*range(10000)}
14181418
main()
14191419
```
14201420

@@ -1424,8 +1424,8 @@ Line # Hits Time Per Hit % Time Line Contents
14241424
==============================================================
14251425
1 @profile
14261426
2 def main():
1427-
3 1 6196.0 6196.0 53.2 a = [(i%3 + 1) * 3 for i in range(10000)]
1428-
4 1 5455.0 5455.0 46.8 b = [i ** (i/10000) for i in range(10000)]
1427+
3 1 1128.0 1128.0 27.4 a = [*range(10000)]
1428+
4 1 2994.0 2994.0 72.6 b = {*range(10000)}
14291429
```
14301430

14311431
### Call Graph

0 commit comments

Comments
 (0)