Skip to content

Commit 930150f

Browse files
committed
Prealloc a bit
1 parent d861861 commit 930150f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/ast/ast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10950,7 +10950,7 @@ func (node *SourceFile) ECMALineMap() []core.TextPos {
1095010950
// If the name appears more than once, the value is -1.
1095110951
func (file *SourceFile) GetNameTable() map[string]int {
1095210952
file.nameTableOnce.Do(func() {
10953-
nameTable := make(map[string]int)
10953+
nameTable := make(map[string]int, file.IdentifierCount)
1095410954

1095510955
isTagName := func(node *Node) bool {
1095610956
return node.Parent != nil && IsJSDocTag(node.Parent) && node.Parent.TagName() == node

0 commit comments

Comments
 (0)