Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash test 05022024
(version: 0)
Comparing performance of:
Lodash vs Native
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var firstObject = { "workspaceID": "2de280ce-46a5-4ec6-be58-47c63dd0490b", "name": "eg chart test", "isLayout": false, "jsonUIConf": "{\"columnsCount\":18,\"rowsCount\":21}", "workspaceType": "workspace", "workspaceWidget": [ { "jsonUIConf": "{\"w\":18,\"h\":1,\"x\":0,\"y\":20,\"i\":\"l6nb0s52\",\"moved\":false,\"static\":true,\"isDraggable\":true,\"isResizable\":true}", "widget": { "widgetID": "d61d1381-3692-407f-850b-8bdde71a3ff7", "modifiedDate": "2024-01-31T13:54:08.103+03:00", "isReadOnly": false, "name": "Time Range", "jsonUIConf": "{\r\n \"timeRangeType\": \"thirdView\",\r\n \"beginDate\": \"2023-06-30T11:49:24.527Z\",\r\n \"endDate\": \"2023-06-30T11:54:24.527Z\",\r\n \"endDateInterval\": 300,\r\n \"beginDateInterval\": 300\r\n}", "widgetType": "timeRange", "widgetDataSource": { "mode": "normal", "dataFilter": { "beginDate": "2023-02-02T09:55:04.238+00:00", "endDate": "2023-02-02T10:00:04.238+00:00", "interpolation": { "forceDisableInterpolation": false } }, "analyzeMonitoringObjectList": [ {} ], "analyzerMeasuresList": [] } } }, { "jsonUIConf": "{\"w\":18,\"h\":20,\"x\":0,\"y\":0,\"i\":\"ljnwb5cd\",\"moved\":false,\"static\":true,\"isDraggable\":true,\"isResizable\":true}", "widget": { "widgetID": "368a9812-7aca-419e-af1c-b1b0a307bef0", "modifiedDate": "2024-01-31T13:54:08.29+03:00", "isReadOnly": false, "name": "Video player", "jsonUIConf": "{\r\n \"isMuted\": true,\r\n \"widgetVariant\": \"clientSide\"\r\n}", "widgetType": "videoPlayer", "widgetDataSource": { "mode": "normal", "analyzeMonitoringObjectList": [ { "monitoringObjectID": "e8dafd06-9e5d-41b1-9781-4c59bd8ff25c" } ], "analyzerMeasuresList": [] } } } ], "isReadOnly": false }; var secondObject = { "workspaceID": "2de280ce-46a5-4ec6-be58-47c63dd0490b", "name": "eg chart test", "isLayout": false, "jsonUIConf": "{\"columnsCount\":18,\"rowsCount\":21}", "workspaceType": "workspace", "workspaceWidget": [ { "jsonUIConf": "{\"w\":18,\"h\":1,\"x\":0,\"y\":20,\"i\":\"l6nb0s52\",\"moved\":false,\"static\":true,\"isDraggable\":true,\"isResizable\":true}", "widget": { "widgetID": "d61d1381-3692-407f-850b-8bdde71a3ff7", "modifiedDate": "2024-01-31T13:54:08.103+03:00", "isReadOnly": false, "name": "Time Range", "jsonUIConf": "{\r\n \"timeRangeType\": \"thirdView\",\r\n \"beginDate\": \"2023-06-30T11:49:24.527Z\",\r\n \"endDate\": \"2023-06-30T11:54:24.527Z\",\r\n \"endDateInterval\": 300,\r\n \"beginDateInterval\": 300\r\n}", "widgetType": "timeRange", "widgetDataSource": { "mode": "normal", "dataFilter": { "beginDate": "2023-02-02T09:55:04.238+00:00", "endDate": "2023-02-02T10:00:04.238+00:00", "interpolation": { "forceDisableInterpolation": false } }, "analyzeMonitoringObjectList": [ {} ], "analyzerMeasuresList": [] } } }, { "jsonUIConf": "{\"w\":18,\"h\":20,\"x\":0,\"y\":0,\"i\":\"ljnwb5cd\",\"moved\":false,\"static\":true,\"isDraggable\":true,\"isResizable\":true}", "widget": { "widgetID": "368a9812-7aca-419e-af1c-b1b0a307bef0", "modifiedDate": "2024-01-31T13:54:08.29+03:00", "isReadOnly": false, "name": "Video player", "jsonUIConf": "{\r\n \"isMuted\": true,\r\n \"widgetVariant\": \"clientSide\"\r\n}", "widgetType": "videoPlayer", "widgetDataSource": { "mode": "normal", "analyzeMonitoringObjectList": [ { "monitoringObjectID": "e8dafd06-9e5d-41b1-9781-4c59bd8ff25c" } ], "analyzerMeasuresList": [] } } } ], "isReadOnly": false };
Tests:
Lodash
var result = _.isEqual(firstObject, secondObject)
Native
var firstObjectString = JSON.stringify(firstObject); var secondObjectString = JSON.stringify(secondObject); var result = firstObjectString === secondObjectString
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash
Native
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser/OS:
Chrome 121 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Lodash
134214.6 Ops/sec
Native
212554.2 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It appears you have provided a JSON object that contains information about two benchmark test cases: one using the Lodash library and another using native JavaScript. To answer your question, I will focus on the `Benchmark Definition` of each test case. For the "Lodash" test case: ```json "Benchmark Definition": "var result = _.isEqual(firstObject, secondObject)" ``` This is a simple equality check between two objects using Lodash's `isEqual()` function. The output of this benchmark will likely be faster than native JavaScript because Lodash is optimized for performance. For the "Native" test case: ```json "Benchmark Definition": "var firstObjectString = JSON.stringify(firstObject);\r\nvar secondObjectString = JSON.stringify(secondObject);\r\n\r\nvar result = firstObjectString === secondObjectString" ``` This benchmark compares two objects using their stringified representations. This is a slower operation compared to directly comparing the objects themselves, as it involves creating and comparing strings. Based on these benchmark definitions, I would expect the "Lodash" test case to be faster than the "Native" test case.
Related benchmarks:
lodash vs json
ataetaetaet
json.stringify vs lodash.isEquals
JSON.stringify vs structuredClone large one
Comments
Confirm delete:
Do you really want to delete benchmark?