On this testbed, reading a known property from Object.create(null) is about 3.4 times slower than reading it from a literal. Shape diversity and dictionary mode also change the cost of hot property access.
Conditions
Runtime
Node.js 22.22.3 · V8 12.4.254.21-node.56
Machine
Intel Xeon E5-2680 v4 · x64 · Ubuntu 24.04
Conditions
One logical CPU · 100,000 objects created before measurement
Methodology
Objects with id, name, and age properties are created before measurement. The timed loop reads the known obj.id property.
The cases cover literals, stepwise assignment, two and six shapes, dictionary mode after delete, and Object.create(null).
The table combines three independent runs in the same environment. V8 intrinsics provide a separate check of the objects' internal state.
Results
The table scrolls horizontally.
Reading obj.id · Node.js 22 / Xeon · range across three runs
Scenario
Avg, ns/operation
p99, ns/operation
Literal · one shape
3.41–3.42
4.28–4.38
Stepwise · same order
3.45–3.46
4.39–4.43
Polymorphic IC · 2 shapes
4.12
5.10–5.12
Megamorphic IC · 6 shapes
9.32–9.46
10.75–14.51
Dictionary mode · after delete
23.17–29.70
33.62–42.07
Object.create(null)
11.69–11.80
18.31–18.77
Minimum and maximum span three results; they are not confidence intervals. The p99 values describe the property-read microbenchmark.
Limits of the conclusion
This experiment does not measure object creation, missing-key lookups, property insertion, deletion, or iteration.
Absolute values depend on the processor, V8 version, and optimization context. A faster property read does not imply the same speedup for an application.
Object.create(null) is useful as a dictionary without a prototype. These known-property reads do not replace a benchmark of dictionary operations.
Reproduce the experiment
Use Node.js 22 and Linux with taskset to repeat the table's conditions. On another OS, npm run bench runs the suite in a different environment.
git clone https://github.com/zerodeps-tech/object-shapes-bench
cd object-shapes-bench
npm install
# Linux: pin the process to one logical CPU
taskset -c 2 node --expose-gc bench/shapes.mjs
npm run bench:inspect