[PR #388] Optimized LineReader using string.IndexOfAny #983

Closed
opened 2026-01-29 14:48:07 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: No


The LineReader struct is responsible for parsing source text into lines.

Given that String.IndexOfAny is now vectorized, it makes sense to use it instead of the handwritten, unoptimized loop in LineReader.ReadLine().

**Original Pull Request:** https://github.com/xoofx/markdig/pull/388 **State:** closed **Merged:** No --- The `LineReader` struct is responsible for parsing source text into lines. Given that `String.IndexOfAny` [is now vectorized](https://source.dot.net/#System.Private.CoreLib/String.Searching.cs,cf166f50515b56ae), it makes sense to use it instead of the handwritten, unoptimized loop in `LineReader.ReadLine()`.
claunia added the pull-request label 2026-01-29 14:48:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#983