comrak
comrak copied to clipboard
O(n^2) for inline link parsing
$ time python -c 'print("[t](/u) " * 10000)' | ./target/release/comrak >/dev/null
real 0m1.599s
user 0m1.593s
sys 0m0.006s
$ time python -c 'print("[t](/u) " * 20000)' | ./target/release/comrak >/dev/null
real 0m6.280s
user 0m6.276s
sys 0m0.004s
$ time python -c 'print("[t](/u) " * 40000)' | ./target/release/comrak >/dev/null
real 0m25.403s
user 0m25.386s
sys 0m0.011s