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

Optimize string slicing. #53

Merged
merged 7 commits into from Mar 13, 2021
Merged

Optimize string slicing. #53

merged 7 commits into from Mar 13, 2021

Conversation

soasme
Copy link
Owner

@soasme soasme commented Mar 13, 2021

As revealed in #48, since() is the most frequently called proc. This PR is aimed to eliminate all since() calls.

Comparing to the current master, it provides roughly 40% performance improvement when running against out2.txt, a 100k doc.

Before:

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

After:

real	0m1.663s
user	0m0.535s
sys	0m0.016s

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