Can JavaScript benefit from the ECS pattern? (version: 0)
JS arrays are weird and (probably?) not memory-contiguous, but just for kicks, let's see what difference there is (if any) between performing the same action on 1,000,000 objects in an object-oriented style (with the method attached to the object) vs an ECS-style (with the behavior separated from the raw data)
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
OO-style
ECS-style
Fastest:N/A
Slowest:N/A
ⓘGet performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date:
9 days ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36