Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
TEstzgzrg
(version: 1)
Comparing performance of:
set vs Includes
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
set
const SINGLETON_LIBRARIES = new Set(['react-router-dom', 'react-router', 'react']); const config = { name: '{{remoteName}}', exposes: { './Module': './src/remote-entry.ts', }, shared: (libraryName, sharedConfig) => { if (SINGLETON_LIBRARIES.has(libraryName)) { return { ...sharedConfig, singleton: true, }; } return sharedConfig; }, };
Includes
const SINGLETON_LIBRARIES = ['react-router-dom', 'react-router', 'react']; const config = { name: '{{remoteName}}', exposes: { './Module': './src/remote-entry.ts', }, shared: (libraryName, sharedConfig) => SINGLETON_LIBRARIES.includes(libraryName) ? { ...sharedConfig, singleton: true, } : sharedConfig, };
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
set
Includes
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
set
17438970.0 Ops/sec
Includes
182490864.0 Ops/sec
Related benchmarks:
Assigning new variable
Constructor parameters versus object assignment
undefined to boolean
JS Variable Performance (const vs let vs var)
js mul vs pow
Test direct and destructuring performances
classNames
classNames2
benchmark for benchmarks
Comments
Confirm delete:
Do you really want to delete benchmark?