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

Emoji and abbreviations parser #305

Merged
merged 8 commits into from
Feb 8, 2019

Conversation

MihaZupan
Copy link
Collaborator

@MihaZupan MihaZupan commented Feb 6, 2019

Fixes #296
Fewer memory allocations:

Building a new pipeline:

Method Mean Gen 0/1k Op Gen 1/1k Op Allocated Memory/Op
Markdig 12.05 us 19.1498 - 14.72 KB
Markdig_Advanced 42.11 us 45.1660 - 34.75 KB
Markdig_Advanced_Emoji 1,490.56 us 285.1563 130.8594 1502.8 KB
Markdig_Advanced_Emoji_Modified 1,499.65 us 298.8281 126.9531 1502.77 KB
(new) Method Mean Gen 0/1k Op Gen 1/1k Op Allocated Memory/Op
Markdig 12.04 us 19.1498 - 14.72 KB
Markdig_Advanced 41.97 us 45.1660 - 34.75 KB
Markdig_Advanced_Emoji 194.58 us 76.6602 15.3809 134.75 KB
Markdig_Advanced_Emoji_Modified 252.09 us 85.4492 18.5547 162.05 KB

Where Modified forces the lazy-init of dictionary properties.

Parsing speed for emojis and abbreviations is about the same (~10% faster for emojis),
as the dataset could be considered the worst-case for a prefix tree of this type (every input starts with the same character).

@xoofx xoofx merged commit 1d8266b into xoofx:master Feb 8, 2019
@xoofx
Copy link
Owner

xoofx commented Feb 8, 2019

Thanks, great perf improvement!

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.

Abbreviation matching
2 participants