perf(packages/codegen): eagerly initialize `mapNames` (#25979)
Previously `mapNames` property of state was lazily initialized - it started as `null`, and an array is only created when a named mapping is written. Often lazy initialization is a good strategy, but in this case IMO it's a poor trade-off - it adds a check for every named mapping that's written in return for saving a single allocation per file, and only in files which produce a source map with no names. Allocating 1 empty array is very cheap.
O
overlookmotel committed
53f62701f822e870011c71d597a141a0581dfbc9
Parent: 5b43c60