Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
React 3
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/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Inline
947123.1 Ops/sec
Reference
892515.5 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.production.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js"></script> <div id="root"></div>
Script Preparation code:
const DEFAULT_PROPS = {c: 1, d: 1}; const clickMe = () => { console.log('hello world'); } function InlineTest(props) { const {a, b, c, d} = {...DEFAULT_PROPS, ...props} return null } function ReferenceTest(props) { const {a, b, c, d} = React.useMemo(() => ({...DEFAULT_PROPS, ...props}), [props]); return null }
Tests:
Inline
ReactDOM.render(React.createElement(InlineTest, { a: 1, b: 2}), document.getElementById('root'))
Reference
ReactDOM.render(React.createElement(ReferenceTest, { a: 1, b: 2}), document.getElementById('root'))