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

Fall through to next html pattern early if tag startRe matched failed. #52

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

soasme
Copy link
Owner

@soasme soasme commented Mar 12, 2021

Given the usecase out2.txt provided in #48, the performance improvement is 2x.
The test result is running on my local (mbp 2.8 GHz Quad-Core Intel Core i7, 16 GB).

Before:

$ nim c -d:release src/markdown.nim && time ./src/markdown < /tmp/out2.txt
real	0m2.616s
user	0m1.897s
sys	0m0.018s

After:

$ nim c -d:release src/markdown.nim && time ./src/markdown < /tmp/out2.txt
real	0m1.751s
user	0m0.946s
sys	0m0.013s

@soasme soasme merged commit bdcc064 into master Mar 12, 2021
@soasme soasme deleted the optm-htmlblk branch March 12, 2021 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant