Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
array iteration vs _.each vs map vs for..of vs for loop AP
(version: 0)
Comparing performance of:
_.each vs forEach vs map vs for..of vs for loop
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
var array = [ { source: 'calendar-view', appointment: { appointmentId: 13937, startTime: '2023-11-03T00:00:00-04:00', endTime: '2023-11-03T00:30:00-04:00', duration: 30, status: 'PENDING', location: '163_FACILITY', isTelehealth: false, event: { name: 'AP Meeting/Admin', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 463400200, firstName: 'Sumit', middleName: '', lastName: 'kale', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T04:00:00.000Z', end: '2023-11-03T04:30:00.000Z', resourceId: 55, slotIndex: 314, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 53, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T00:30:00', endTime: '2023-11-03T01:30:00', duration: 60, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T04:30:00.000Z', end: '2023-11-03T05:30:00.000Z', resourceId: 55, slotIndex: 339, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 47, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T00:45:00', endTime: '2023-11-03T01:45:00', duration: 60, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T04:45:00.000Z', end: '2023-11-03T05:45:00.000Z', resourceId: 55, slotIndex: 338, }, { source: 'calendar-view', appointment: { appointmentId: 13932, startTime: '2023-11-03T02:00:00-04:00', endTime: '2023-11-03T03:00:00-04:00', duration: 60, status: 'PENDING', location: '163_FACILITY', isTelehealth: false, event: { name: 'AP Alt Patient Event', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T06:00:00.000Z', end: '2023-11-03T07:00:00.000Z', resourceId: 55, slotIndex: 315, }, { source: 'calendar-view', appointment: { appointmentId: 13933, startTime: '2023-11-03T04:00:00-04:00', endTime: '2023-11-03T05:00:00-04:00', duration: 60, status: 'PENDING', location: '163_FACILITY', isTelehealth: false, event: { name: 'AP Meeting/Admin', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T08:00:00.000Z', end: '2023-11-03T09:00:00.000Z', resourceId: 55, slotIndex: 316, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 48, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T05:45:00', endTime: '2023-11-03T06:15:00', duration: 30, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T09:45:00.000Z', end: '2023-11-03T10:15:00.000Z', resourceId: 55, slotIndex: 335, }, { source: 'calendar-view', appointment: { appointmentId: 13941, startTime: '2023-11-03T06:15:00-04:00', endTime: '2023-11-03T06:40:00-04:00', duration: 25, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Alt Patient Event', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078000200, firstName: 'JMD Rocks', middleName: 'JMD Rocks', lastName: 'JMD Rocks', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T10:15:00.000Z', end: '2023-11-03T10:40:00.000Z', resourceId: 55, slotIndex: 317, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 59, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T06:40:00', endTime: '2023-11-03T07:00:00', duration: 20, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T10:40:00.000Z', end: '2023-11-03T11:00:00.000Z', resourceId: 55, slotIndex: 331, }, { source: 'calendar-view', appointment: { appointmentId: 13934, startTime: '2023-11-03T07:00:00-04:00', endTime: '2023-11-03T08:00:00-04:00', duration: 60, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 463400200, firstName: 'Sumit', middleName: '', lastName: 'kale', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T11:00:00.000Z', end: '2023-11-03T12:00:00.000Z', resourceId: 55, slotIndex: 318, }, { source: 'calendar-view', appointment: { appointmentId: 13947, startTime: '2023-11-03T08:00:00-04:00', endTime: '2023-11-03T08:20:00-04:00', duration: 20, status: 'PENDING', location: 'Greater Victoria Hospital', isTelehealth: false, event: { name: 'AP Alt Patient Event', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 1078000200, firstName: 'JMD Rocks', middleName: 'JMD Rocks', lastName: 'JMD Rocks', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T12:00:00.000Z', end: '2023-11-03T12:20:00.000Z', resourceId: 55, slotIndex: 319, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 65, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T08:20:00', endTime: '2023-11-03T09:00:00', duration: 40, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T12:20:00.000Z', end: '2023-11-03T13:00:00.000Z', resourceId: 55, slotIndex: 337, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 68, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T09:05:00', endTime: '2023-11-03T09:15:00', duration: 10, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T13:05:00.000Z', end: '2023-11-03T13:15:00.000Z', resourceId: 55, slotIndex: 328, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 69, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T09:25:00', endTime: '2023-11-03T09:50:00', duration: 25, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T13:25:00.000Z', end: '2023-11-03T13:50:00.000Z', resourceId: 55, slotIndex: 333, }, { source: 'calendar-view', appointment: { appointmentId: 13935, startTime: '2023-11-03T10:15:00-04:00', endTime: '2023-11-03T11:15:00-04:00', duration: 60, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Alt Patient Event', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T14:15:00.000Z', end: '2023-11-03T15:15:00.000Z', resourceId: 55, slotIndex: 320, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 73, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T11:15:00', endTime: '2023-11-03T11:25:00', duration: 10, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T15:15:00.000Z', end: '2023-11-03T15:25:00.000Z', resourceId: 55, slotIndex: 329, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 74, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T11:30:00', endTime: '2023-11-03T11:50:00', duration: 20, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T15:30:00.000Z', end: '2023-11-03T15:50:00.000Z', resourceId: 55, slotIndex: 332, }, { source: 'calendar-view', allocatedTimeSlot: { freezeNotes: 's', freezeReason: 'YN Freeze Reason', resourceId: 55, startTime: '2023-11-03T11:55:00', endTime: '2023-11-03T12:00:00', duration: 5, sourceType: 'AdHocFreeze', category: { type: 'AdHocFreeze', value: 'Unavailable', }, }, start: '2023-11-03T15:55:00.000Z', end: '2023-11-03T16:00:00.000Z', resourceId: 55, slotIndex: 341, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 75, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T12:00:00', endTime: '2023-11-03T12:25:00', duration: 25, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T16:00:00.000Z', end: '2023-11-03T16:25:00.000Z', resourceId: 55, slotIndex: 334, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 76, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T12:30:00', endTime: '2023-11-03T12:40:00', duration: 10, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T16:30:00.000Z', end: '2023-11-03T16:40:00.000Z', resourceId: 55, slotIndex: 330, }, { source: 'calendar-view', appointment: { appointmentId: 13936, startTime: '2023-11-03T12:40:00-04:00', endTime: '2023-11-03T13:40:00-04:00', duration: 60, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Meeting/Admin', categoryType: 'Meeting/Admin', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 2, resourceName: 'Ansari1, Aftab', resourceType: 'P', isAnchorResource: false, }, ], patient: { patientGuid: 1078200200, firstName: 'JMD Rocks Def', middleName: 'JMD Rocks Def', lastName: 'JMD Rocks Def', }, category: { type: 'event', value: 'Meeting/Admin', }, }, start: '2023-11-03T16:40:00.000Z', end: '2023-11-03T17:40:00.000Z', resourceId: 55, slotIndex: 321, }, { source: 'calendar-view', appointment: { appointmentId: 13950, startTime: '2023-11-03T14:00:00-04:00', endTime: '2023-11-03T14:30:00-04:00', duration: 30, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T18:00:00.000Z', end: '2023-11-03T18:30:00.000Z', resourceId: 55, slotIndex: 322, }, { source: 'calendar-view', appointment: { appointmentId: 13962, startTime: '2023-11-03T14:40:00-04:00', endTime: '2023-11-03T15:05:00-04:00', duration: 25, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T18:40:00.000Z', end: '2023-11-03T19:05:00.000Z', resourceId: 55, slotIndex: 323, }, { source: 'calendar-view', appointment: { appointmentId: 13951, startTime: '2023-11-03T15:05:00-04:00', endTime: '2023-11-03T15:35:00-04:00', duration: 30, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T19:05:00.000Z', end: '2023-11-03T19:35:00.000Z', resourceId: 55, slotIndex: 324, }, { source: 'calendar-view', appointment: { appointmentId: 13956, startTime: '2023-11-03T15:20:00-04:00', endTime: '2023-11-03T15:50:00-04:00', duration: 30, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T19:20:00.000Z', end: '2023-11-03T19:50:00.000Z', resourceId: 55, slotIndex: 325, }, { source: 'calendar-view', appointment: { appointmentId: 13953, startTime: '2023-11-03T16:05:00-04:00', endTime: '2023-11-03T16:35:00-04:00', duration: 30, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T20:05:00.000Z', end: '2023-11-03T20:35:00.000Z', resourceId: 55, slotIndex: 326, }, { source: 'calendar-view', appointment: { appointmentId: 13957, startTime: '2023-11-03T16:05:00-04:00', endTime: '2023-11-03T16:35:00-04:00', duration: 30, status: 'PENDING', location: 'GVH-EastWing 1A', isTelehealth: false, event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, notes: '', complaint: '', resources: [ { resourceId: 18, resourceName: 'Jadhav, Vikas V', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { patientGuid: 1078100200, firstName: 'JMD Rocks PE', middleName: 'JMD Rocks PE', lastName: 'JMD Rocks PE', }, category: { type: 'event', value: 'Patient Event', }, }, start: '2023-11-03T20:05:00.000Z', end: '2023-11-03T20:35:00.000Z', resourceId: 55, slotIndex: 327, }, { source: 'calendar-view', allocatedTimeSlot: { event: null, timeSlotId: 41, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: { firstName: 'AP Reserved Time', middleName: 'AP Reserved Time', lastName: 'AP Reserved Time', birthYear: 0, birthMonth: 0, birthDay: 0, birthTime: '', gender: '', isEstimatedDob: false, }, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T16:45:00', endTime: '2023-11-03T17:15:00', duration: 30, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T20:45:00.000Z', end: '2023-11-03T21:15:00.000Z', resourceId: 55, slotIndex: 336, }, { source: 'calendar-view', allocatedTimeSlot: { event: { name: 'AP Patient Event', categoryType: 'Patient Event', }, timeSlotId: 42, location: { locationName: 'GVH-EastWing 1A', locationGuid: 76600610, }, resources: [ { resourceId: 1, resourceName: 'Ongmore, John', resourceType: 'P', isAnchorResource: false, }, { resourceId: 55, resourceName: 'Patel, Arpan', resourceType: 'P', isAnchorResource: true, }, ], patient: null, additionalInformation: '', resourceId: 55, startTime: '2023-11-03T17:40:00', endTime: '2023-11-03T22:40:00', duration: 300, sourceType: 'ReserveTime', category: { type: 'ReserveTime', value: 'Patient Event', }, }, start: '2023-11-03T21:40:00.000Z', end: '2023-11-04T02:40:00.000Z', resourceId: 55, slotIndex: 340, }, ]; var newArr = [];
Tests:
_.each
_.each(array, (value, index) => { console.log(value) })
forEach
array.forEach((value, index) => { console.log(value) })
map
array.map((value, index) => { console.log(value) })
for..of
for (const value of array) { console.log(value) }
for loop
for (let i = 0; i < array.length; i++) { console.log(array[i]) }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
_.each
forEach
map
for..of
for loop
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 seems like you provided a large amount of JSON data, an HTML string, and several benchmarking test cases with their corresponding results. However, it appears that this is not a standard format for providing input or output for a problem. Could you please reformat the text into a more traditional format? If I had to take a guess, I would say that: - The JSON data represents an array of objects, possibly related to appointments or events. - The HTML string might be related to JavaScript code or a benchmarking script. - The individual test cases represent different approaches to iterating over the array and logging values. If you could provide more context or clarify what specific problem or task these inputs are related to, I'd be happy to try and help.
Related benchmarks:
Regular for vs forEach
foreach vs map vs for in v2
for vs foreach vs map 2
simple array and map vs forEach vs for by cuteLuna v3
simple array and map vs forEach vs for by cuteLuna v4
Comments
Confirm delete:
Do you really want to delete benchmark?