Closed gibson042 closed 1 month ago
None.
The total effect is an improvement of 10% to 20% on both V8 and XS for passStyleOf(harden(largeArrayOrPlainObject)) as observed by
passStyleOf(harden(largeArrayOrPlainObject))
scripts/esbench.mjs -b3 -h'V8,*XS' \ -M @endo/init \ -i 'import { passStyleOf } from "@endo/pass-style"; globalThis.passStyleOf = passStyleOf;' \ --arg len:0,1,10,100 \ --setup 'const arr = Array(+len).fill(""), obj = Object.fromEntries(arr.map((val, i) => [`key${i}`, val]));' \ 'passStyleOf(harden(arr.slice()))' \ 'passStyleOf(harden({ ...obj }))' \ | grep -v '^Removing '
All existing tests still pass.
n/a
None in particular.
Does not need a NEWS entry. A dependent package maintainer does not need to change anything to either maintain compatibility or take advantage of the new facility.
Description
Security Considerations
None.
Scaling Considerations
The total effect is an improvement of 10% to 20% on both V8 and XS for
passStyleOf(harden(largeArrayOrPlainObject))
as observed byDocumentation Considerations
None.
Testing Considerations
All existing tests still pass.
Compatibility Considerations
n/a
Upgrade Considerations
None in particular.