mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
[PR #396] Use BitVector128 in CharacterMap<T> #994
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/xoofx/markdig/pull/396
State: closed
Merged: Yes
CharacterMap<T>uses abool[] isOpeningCharacterfor quick lookup.This PR replaces that by a custom
BitVector128that stores 128 bits is two ulong fields using a fixed size buffer.This results in a measurable speedup:
The benchmark:
The results on .NET Framework:
Before:
After:
The results on .NET Core:
Before:
After:
Conclusion: parsing time is reduced by about 3 %.