mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
[PR #396] [MERGED] Use BitVector128 in CharacterMap<T> #989
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?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/396
Author: @KrisVandermotten
Created: 2/4/2020
Status: ✅ Merged
Merged: 2/6/2020
Merged by: @xoofx
Base:
master← Head:CharacterMapBitVector128📝 Commits (2)
525e2c7Use BitVector128 in CharacterMap9321628Use uint instead of ulong📊 Changes
1 file changed (+33 additions, -10 deletions)
View changed files
📝
src/Markdig/Helpers/CharacterMap.cs(+33 -10)📄 Description
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 %.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.