Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash sortBy vs orderBy forked
(version: 0)
Lodash sortBy vs orderBy
Comparing performance of:
_.sortBy vs _.orderBy
Created:
5 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:
function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max)); } var arr = [{"id":"OSIRIS:458887500","sourceId":"OSIRIS:33329034","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"INACTIVE","statusSubCode":"TA","startDate":"2019-11-26T07:00:00.000+0000","endDate":"2019-12-31T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:467315777","sourceId":"OSIRIS:33439501","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2020-06-30T07:00:00.000+0000","endDate":"2020-08-04T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:462817595","sourceId":"OSIRIS:33389355","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"INACTIVE","statusSubCode":"TA","startDate":"2020-03-03T07:00:00.000+0000","endDate":"2020-04-07T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:456995316","sourceId":"OSIRIS:33297697","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2019-09-17T07:00:00.000+0000","endDate":"2019-10-22T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:457873887","sourceId":"OSIRIS:33313719","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"INACTIVE","statusSubCode":"TA","startDate":"2019-10-22T07:00:00.000+0000","endDate":"2019-11-26T06:59:59.000+0000","grade":"W","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:465167129","sourceId":"OSIRIS:33425311","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2020-04-14T07:00:00.000+0000","endDate":"2020-05-19T06:59:59.000+0000","grade":"A","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:465269457","sourceId":"OSIRIS:33426359","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2020-04-07T07:00:00.000+0000","endDate":"2020-05-12T06:59:59.000+0000","grade":"A","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:467315864","sourceId":"OSIRIS:33439707","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2020-06-23T07:00:00.000+0000","endDate":"2020-07-28T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:466599703","sourceId":"OSIRIS:33434895","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2020-07-07T07:00:00.000+0000","endDate":"2020-08-11T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:466906728","sourceId":"OSIRIS:33437054","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2020-07-14T07:00:00.000+0000","endDate":"2020-08-18T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:465951331","sourceId":"OSIRIS:33430607","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2020-05-05T07:00:00.000+0000","endDate":"2020-06-09T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:468475926","sourceId":"OSIRIS:33446501","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2020-07-28T07:00:00.000+0000","endDate":"2020-09-01T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:462579348","sourceId":"OSIRIS:33389889","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"INACTIVE","statusSubCode":"TA","startDate":"2020-03-03T07:00:00.000+0000","endDate":"2020-04-07T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:468783166","sourceId":"OSIRIS:33369450","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2019-12-10T07:00:00.000+0000","endDate":"2020-01-28T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:460988266","sourceId":"OSIRIS:33364232","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"INACTIVE","statusSubCode":"TA","startDate":"2020-01-21T07:00:00.000+0000","endDate":"2020-02-25T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:462783613","sourceId":"OSIRIS:33392948","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"CO","startDate":"2020-02-10T07:00:00.000+0000","endDate":"2020-03-16T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"OSIRIS:462851478","sourceId":"OSIRIS:33393967","sourceType":"SECTION","personId":"626488414876553216","studentProgramId":"4862081","roleType":"Student","status":"ACTIVE","statusSubCode":"SC","startDate":"2020-04-14T07:00:00.000+0000","endDate":"2020-05-13T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"SDW:9052209","sourceId":"SDW:13391630","sourceType":"SECTION","personId":"626488414876553216","roleType":"Student","status":"SC","startDate":"2020-11-05T07:00:00.000+0000","endDate":"2020-11-20T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"SDW:9052209","sourceId":"SDW:13391629","sourceType":"SECTION","personId":"626488414876553216","roleType":"Student","status":"SC","startDate":"2020-10-29T07:00:00.000+0000","endDate":"2020-11-05T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"},{"id":"SDW:9052209","sourceId":"SDW:13391132","sourceType":"SECTION","personId":"626488414876553216","roleType":"Student","status":"DR","startDate":"2020-03-15T07:00:00.000+0000","endDate":"2020-03-23T06:59:59.000+0000","profileId":"a65c500c-57c6-4d73-a535-dbf09f868362"}];
Tests:
_.sortBy
_.sortBy(arr,["startDate"]);
_.orderBy
_.orderBy(arr,["startDate", "endDate"]);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
_.sortBy
_.orderBy
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It looks like we're working with a JSON string that contains data about individuals, including their profiles and roles. If I'm not mistaken, the raw JSON string is: ``` [ { "id": "OSIRIS:462783613", ... }, { "id": "OSIRIS:462851478", ... }, ... ] ``` And we also have a separate JSON object for individual test cases: ``` { "Individual Test Cases": [ { "Benchmark Definition": "_.sortBy(arr,[\"startDate\"]);", "Test Name": "_.sortBy" }, { "Benchmark Definition": "_.orderBy(arr,[\"startDate\", \"endDate\"]);", "Test Name": "_.orderBy" } ] } ``` Lastly, we have a JSON object for the latest benchmark result: ``` [ { "RawUAString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", ... }, { "RawUAString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", ... } ] ``` Can you please tell me what specific problem or question you'd like to tackle with this data?
Related benchmarks:
sortby vs orderby
Lodash orderBy() vs array.prototype.sort
order desc with lodash orderBy vs es6 sort method
Lodash orderBy vs array.prototype.sort fork
Lodash orderBy (fn) vs array.prototype.sort small array
Comments
Confirm delete:
Do you really want to delete benchmark?