MetadataHelpers.SplitQualifiedName interllay uses string.Split. This results...
MetadataHelpers.SplitQualifiedName interllay uses string.Split. This results in an allocation. The allocation is immediately converted to an ImmutableArray. This change replaces string.Split with a hand-rolled algorithm that tries to avoid allocations. First, zero or 1 length arrays avoid any intermediate allocations. For larger results, the exact length is precomputed and we try to get an ArrayBuilder from the pool. As a bonus, since "System" is such a frequent first string, we avoid a new substring allocation. (changeset 1213621)
Showing
想要评论请 注册 或 登录