Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Delete vs filter for objects
Measure the performance of delete versus removing a prop from an object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
delete
110.4M/s
filter
3.7M/s
View exact numbers
Test name
Executions per second
✓
delete
110,431,720 Ops/sec
filter
3,729,394 Ops/sec
Script Preparation code:
var obj = { a:1, b:2, c:3 }
Tests:
delete
delete obj.a
filter
const res = Object.fromEntries(Object.entries(obj).filter(k => k !== 'a'))