Skip to content

Commit 8298af4

Browse files
committed
docs(pangram): improve performance content and links
1 parent 136c847 commit 8298af4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

exercises/practice/pangram/.articles/performance/content.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ For our performance investigation, we'll also include a fourth approach that [us
1515
To benchmark the approaches, we wrote a [small benchmark application][benchmark-application] using the [`timeit`][timeit] library.
1616

1717
```
18-
all: 1.505466179997893e-05
19-
all: 1.6063886400021147e-05 // with sentence.casefold()
20-
set: 1.950172399985604e-06
21-
len: 3.7158977999933994e-06
22-
bit: 8.75982620002469e-06
18+
all: 1.8692991019000146e-05
19+
all: 1.686682232399926e-05 // with sentence.casefold()
20+
set: 2.5181135439997888e-06
21+
len: 5.848111433000668e-06
22+
bit: 1.2118699087000096e-05
2323
```
2424

2525
- The `set` `len()` approach is not as fast as the `set` `issubset()` approach.
26-
- The `all()` approach is slower than either `set` approach.
27-
Using `casefold` was slower than using `lower`.
26+
- The `all()` approach is significantly slower than either `set` approach (approximately 6-8x slower).
27+
Using `casefold()` versus `lower()` showed variable performance, with each being faster in different runs.
2828
- Although the bit field approach may be faster in other languages, it is significantly slower in Python.
29-
It is faster than the `all()` approach, but much slower than either `set` approach.
29+
It is faster than the `all()` approach, but much slower than either `set` approach.
3030

3131
[benchmark-application]: https://github.com/exercism/python/blob/main/exercises/practice/pangram/.articles/performance/code/Benchmark.py
3232
[timeit]: https://docs.python.org/3/library/timeit.html
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```
2-
all: 1.505466179997893e-05
3-
all: 1.6063886400021147e-05 // with sentence.casefold()
4-
set: 1.950172399985604e-06
5-
len: 3.7158977999933994e-06
6-
bit: 8.75982620002469e-06
2+
all: 1.8692991019000146e-05
3+
all: 1.686682232399926e-05 // with sentence.casefold()
4+
set: 2.5181135439997888e-06
5+
len: 5.848111433000668e-06
6+
bit: 1.2118699087000096e-05
77
```

0 commit comments

Comments
 (0)