Skip to content

Commit 4dbecdb

Browse files
committed
Add test capturing undesirable performance. Ref #361.
1 parent 9491ef9 commit 4dbecdb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

exercises.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ def uncached_distribution_perf():
3434
# end warmup
3535
importlib.invalidate_caches()
3636
importlib_metadata.distribution('ipython')
37+
38+
39+
def entrypoint_regexp_perf():
40+
import importlib_metadata
41+
import re
42+
43+
input = '0' + ' ' * 2 ** 10 + '0' # end warmup
44+
45+
re.match(importlib_metadata.EntryPoint.pattern, input)

0 commit comments

Comments
 (0)