Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing ‘* * * * * * … a’ takes quadratic time #66

Closed
andersk opened this issue Mar 11, 2019 · 0 comments
Closed

Parsing ‘* * * * * * … a’ takes quadratic time #66

andersk opened this issue Mar 11, 2019 · 0 comments
Labels

Comments

@andersk
Copy link

andersk commented Mar 11, 2019

$ python -c 'print("* " * 40000 + "a")' | time md2html > /dev/null
1.18user 0.00system 0:01.22elapsed 97%CPU (0avgtext+0avgdata 4776maxresident)k
0inputs+0outputs (0major+920minor)pagefaults 0swaps
$ python -c 'print("* " * 80000 + "a")' | time md2html > /dev/null
4.81user 0.00system 0:04.88elapsed 98%CPU (0avgtext+0avgdata 7744maxresident)k
0inputs+0outputs (0major+1684minor)pagefaults 0swaps
$ python -c 'print("* " * 160000 + "a")' | time md2html > /dev/null
19.88user 0.02system 0:20.06elapsed 99%CPU (0avgtext+0avgdata 13944maxresident)k
0inputs+0outputs (0major+3226minor)pagefaults 0swaps

Related: jgm/commonmark-hs#2, commonmark/cmark#284.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants