[PR #622] Vectorize CharacterMap.IndexOfOpeningCharacter #1151

Open
opened 2026-01-29 14:50:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/xoofx/markdig/pull/622

State: closed
Merged: Yes


A 1-2.5% improvement for parsing (on x86 LE hardware only for now)

For long runs without an opening character, the vectorized loop is ~8x faster.

Method AdvancedPipeline Mean Error StdDev Median
Parse False 262.6 us 0.73 us 3.64 us 263.5 us
Parse True 366.9 us 0.43 us 2.16 us 367.2 us
Method AdvancedPipeline Mean Error StdDev
Parse False 259.5 us 0.18 us 0.91 us
Parse True 357.9 us 0.41 us 2.06 us
**Original Pull Request:** https://github.com/xoofx/markdig/pull/622 **State:** closed **Merged:** Yes --- A 1-2.5% improvement for parsing (on x86 LE hardware only for now) For long runs without an opening character, the vectorized loop is ~8x faster. | Method | AdvancedPipeline | Mean | Error | StdDev | Median | |------- |----------------- |---------:|--------:|--------:|---------:| | Parse | False | 262.6 us | 0.73 us | 3.64 us | 263.5 us | | Parse | True | 366.9 us | 0.43 us | 2.16 us | 367.2 us | | Method | AdvancedPipeline | Mean | Error | StdDev | |------- |----------------- |---------:|--------:|--------:| | Parse | False | 259.5 us | 0.18 us | 0.91 us | | Parse | True | 357.9 us | 0.41 us | 2.06 us |
claunia added the pull-request label 2026-01-29 14:50:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1151