mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Object property keys are already unique unless USVString normalization changes a key. Avoid allocating and updating a SafeMap for ordinary record keys. Create and backfill it when normalization first changes a key. This improves object construction by 10% to 25% in the measured cases and reduces allocation by about 31% for a ten-property record. Assisted-by: Amp Signed-off-by: Romain Lanz <romain.lanz@pm.me> PR-URL: https://github.com/nodejs/node/pull/65801 Reviewed-By: James M Snell <jasnell@gmail.com>