mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-15 05:55:41 +00:00
[PR #394] [MERGED] Use HashSet<T> instead of Dictionary<TKey, TValue> in CharacterMap<T> #988
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/394
Author: @KrisVandermotten
Created: 1/31/2020
Status: ✅ Merged
Merged: 1/31/2020
Merged by: @xoofx
Base:
master← Head:charactermap📝 Commits (1)
d4f43f8Use HashSet instead of Dictionary<TKey, TValue> in CharacterMap📊 Changes
1 file changed (+3 additions, -7 deletions)
View changed files
📝
src/Markdig/Helpers/CharacterMap.cs(+3 -7)📄 Description
The
CharacterMap<T>constructor counts the occurrence of each opening character, but doesn't use the actual count.This PR replaces the
Dictionary<char, int>by aHashSet<char>. The dictionary used to be indexed three or four times per iteration though the loop, the hashSet is indexed once per iteration.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.