Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
spread vs assign test for paul.
(version: 0)
Comparing performance of:
Using the spread operator vs Using Object.assign
Created:
6 years ago
by:
Guest
Jump to the latest result
Tests:
Using the spread operator
const state = { general: { activeFilterCount: 3, activeCtyhocn: null, activeHotel: null, filters: { amenities: { freeBreakfast: false, eveningReception: false, freeParking: false, freeWifi: true, nonSmoking: false, digitalKey: true, concierge: true, spa: false, golf: false, tennisCourt: false, resort: false, airportShuttle: false, executiveLounge: false, dining: false, indoorPool: false, outdoorPool: false, fitnessCenter: false, petsAllowed: false, roomService: false, businessCenter: false, meetingRooms: false, petsNotAllowed: false }, brands: { PY: false, CH: false, QQ: false, DT: false, ES: false, HI: false, GI: false, HP: false, HT: false, HW: false, UA: false, UP: false, RU: false, WA: false } }, name: 'Fort Worth, TX, USA', retrievedCtyhocns: [ 'FTWDTHX', 'FTWFWHF', 'FTWESES', 'FTWMCHW', 'FTWMDGI', 'FTWNHGI', 'FTWWTHX', 'FTWRRHX', 'FTWFOHT', 'FTWHWHW', 'DFWSWHT', 'FTWFCHX', 'FTWFHHX', 'FTWSOHW', 'DFWHCGI', 'DALHTHX', 'DFWBDHT', 'FTWBRHX', 'FTWBFHW', 'DALCXGI', 'DALATHX', 'DALAGHW', 'DALETHX', 'DFWARGI', 'ARLAHHF', 'DALARHW', 'FTWAAGI', 'DFWSADT', 'DFWGNRU', 'FTWHSHX', 'FTWMFHX', 'DFWGDHX', 'DFWASHX', 'DFWSLHF', 'DFWGRGI', 'FTWTRHW', 'FTWTCHX', 'DFWNLHT', 'DALEMES', 'DFWAHHF', 'DALGPHX', 'DALHWHW', 'DALADHX', 'DALAHGI', 'DFWHTHT', 'DALASHW', 'FTWCLHX' ], visibleCtyhocns: [ ['FTWFWHF', '$199', 199, 32.752735, -97.329285, 0.28, 'HI', 'Hilton Fort Worth', '815 Main St', 'Fort Worth'], [ 'DFWSADT', '$119', 119, 32.77338049, -97.06348126, 15.54, 'DT', 'DoubleTree by Hilton Hotel Arlington DFW South', '1507 North Watson Road', 'Arlington' ], [ 'DFWSLHF', '$163', 163, 32.9477, -97.1301, 17.97, 'HI', 'Hilton Dallas/Southlake Town Square', '1400 Plaza Place', 'Southlake' ] ], prevActiveCtyhocn: null, selectSource: null }, list: { canPageBackward: false, canPageForward: true, currentPage: 1, pageAmount: 20, pages: [ [ { _id: 'FTWFWHF', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'fitnessCenter', 'businessCenter', 'digitalKey', 'concierge', 'executiveLounge', 'roomService', 'meetingRooms', 'petsNotAllowed' ], brandCode: 'HI', chainCode: 'HF', ctyhocn: 'FTWFWHF', currencyCode: 'USD', distance: 0.28, distanceFmt: '0.28 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/ftwfwhf-hilton-fort-worth/', homepageUrl: 'https://www3-stg.hilton.com/en/hotels/texas/hilton-fort-worth-FTWFWHF/index.html', name: 'Hilton Fort Worth', phoneNumber: '+1-817-870-2100', propCode: 'FTWFW', resSystem: 'H', address: { addressFmt: '815 Main St, Fort Worth, Texas, 76102, USA', addressLine1: '815 Main St', addressLine2: null, city: 'Fort Worth', country: 'US', countryName: 'USA', postalCode: '76102', primeCity: 'Fort Worth', state: 'TX', stateName: 'Texas', _id: 'd628a2a37e89e370405be06efe460096058f26005972df9946ce1eea3e632945', __typename: 'HotelAddress' }, coordinate: { latitude: 32.752735, latitudeFmt: '32.75', longitude: -97.329285, longitudeFmt: '-97.33', __typename: 'HotelCoordinate' }, thumbImage: { _id: 'c03728853a3d91f7cf7cc339ef27cdec78afba4c9db6e7aa814042a1d82125ca', alt: 'Hilton Fort Worth, TX Hotel - Exterior', caption: 'Registered as a national historic landmark, the Hilton Fort Worth hotel has welcomed many famous and important guests to Cowtown.', dcrId: 2651842, src: 'https://secure3-stg.hilton.com/resources/media/hi/FTWFWHF/en_US/img/hotel/information/HH_exterior01_188x150_FitToBoxSmallDimension_Center.jpg', title: 'Exterior ', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/hi/FTWFWHF/en_US/img/hotel/information/HH_exterior01_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: 'a4477a0ab6437f19e20882f6a30d7ff3f0c5175788117987ffb79d75f7e2acc4', lowest: { _id: '53ed909da69e71ea8ef60f508020616a5bb71cf8ba59aa50fed77a1ccc4147bf', rateAmount: 199, rateAmountFmt: '$199', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' }, { _id: 'DFWSADT', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'freeParking', 'outdoorPool', 'fitnessCenter', 'businessCenter', 'digitalKey', 'concierge', 'roomService', 'meetingRooms', 'petsNotAllowed' ], brandCode: 'DT', chainCode: 'DH', ctyhocn: 'DFWSADT', currencyCode: 'USD', distance: 15.54, distanceFmt: '15.54 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/dfwsadt-doubletree-arlington-dfw-south/', homepageUrl: 'https://doubletree3-stg.hilton.com/en/hotels/texas/doubletree-by-hilton-hotel-arlington-dfw-south-DFWSADT/index.html', name: 'DoubleTree by Hilton Hotel Arlington DFW South', phoneNumber: '+1-817-640-7712', propCode: 'DFWSA', resSystem: 'P', address: { addressFmt: '1507 North Watson Road, Arlington, Texas, 76006, USA', addressLine1: '1507 North Watson Road', addressLine2: null, city: 'Arlington', country: 'US', countryName: 'USA', postalCode: '76006', primeCity: 'Arlington', state: 'TX', stateName: 'Texas', _id: '832c7b12536e175b005714b6e9c09483ab638b233470ef85aa42840724132424', __typename: 'HotelAddress' }, coordinate: { latitude: 32.77338049, latitudeFmt: '32.77', longitude: -97.06348126, longitudeFmt: '-97.06', __typename: 'HotelCoordinate' }, thumbImage: { _id: '436e6a948404bbcf301d10e8a126bb84f3ddc74abdd1ae6667e2382bd2afe1d5', alt: 'Doubletree by Hilton Hotel Arlington DFW South, TX - Exterior', caption: 'For your convenience, the hotel offers a complimentary shuttle to DFW Airport, just 15 minutes away.', dcrId: 2730565, src: 'https://secure3-stg.hilton.com/resources/media/dt/DFWSADT/en_US/img/hotel/information/DT_exterior_188x150_FitToWidth_Center.jpg', title: 'Day Exterior with Shuttle', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/dt/DFWSADT/en_US/img/hotel/information/DT_exterior_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: '12255697820765a505ffb1d577f1c064d55606005166e41b64b80191d2f805d9', lowest: { _id: 'dfe34c873230acbc8ea37cbae9919e8aa8c6fa3605db8d144a29a2ff720b96a4', rateAmount: 119, rateAmountFmt: '$119', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' }, { _id: 'DFWSLHF', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'outdoorPool', 'freeParking', 'fitnessCenter', 'businessCenter', 'petsAllowed', 'digitalKey', 'concierge', 'executiveLounge', 'roomService', 'meetingRooms' ], brandCode: 'HI', chainCode: 'HF', ctyhocn: 'DFWSLHF', currencyCode: 'USD', distance: 17.97, distanceFmt: '17.97 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/dfwslhf-hilton-dallas-southlake-town-square/', homepageUrl: 'https://www3-stg.hilton.com/en/hotels/texas/hilton-dallas-southlake-town-square-DFWSLHF/index.html', name: 'Hilton Dallas/Southlake Town Square', phoneNumber: '+1-817-442-9900', propCode: 'DFWSL', resSystem: 'H', address: { addressFmt: '1400 Plaza Place, Southlake, Texas, 76092, USA', addressLine1: '1400 Plaza Place', addressLine2: null, city: 'Southlake', country: 'US', countryName: 'USA', postalCode: '76092', primeCity: 'Dallas', state: 'TX', stateName: 'Texas', _id: 'cfe1e283a8e78d14e5aee6b7b5be4acf21ba23639ecc34d8e1c36507bf375f04', __typename: 'HotelAddress' }, coordinate: { latitude: 32.9477, latitudeFmt: '32.95', longitude: -97.1301, longitudeFmt: '-97.13', __typename: 'HotelCoordinate' }, thumbImage: { _id: 'bcc9a520d8b4e95df642351ce3d5475e30341fed9d234ea0eb12c66d44e96452', alt: 'Hilton Dallas/Southlake Town Square, TX - Exterior', caption: 'Welcome to the Hilton Dallas/ Southlake Town Square', dcrId: 2927901, src: 'https://secure3-stg.hilton.com/resources/media/hi/DFWSLHF/en_US/img/hotel/information/HH_flowerext_188x150_FitToWidth_Center.jpg', title: 'Exterior', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/hi/DFWSLHF/en_US/img/hotel/information/HH_flowerext_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: '8e686838bdefb23a60bfdf9b70965bdbe91b7235a148ed2fcb844026b2ac3fcb', lowest: { _id: '2efeb5d35c99566e77b18ae9ef47f1333077eca2077e7b02ed0377a05f8502f5', rateAmount: 163, rateAmountFmt: '$163', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' } ] ], sortBy: 'DISTANCE' }, map: { bounds: { south: 32.15815713288108, west: -97.97675571386719, north: 33.30078763262553, east: -96.80259189550782 }, center: { lng: -97.32924899999999, lat: 32.74863 }, initialZoom: 10, markerLimit: 200, showFullMarkers: true }, network: { canFetchMore: true, fetchAmountInitial: 3, fetchAmountMore: 5, isLoadingInitial: false, isLoadingMore: false, nextCursor: 'eyJvZmZzZXQiOjUsImxpbWl0Ijo1fQ==', prevCursor: null, shouldFetchMore: false } }; const retrievedCtyhocns = [ 'FTWDTHX', 'FTWFWHF', 'FTWESES', 'FTWMCHW', 'FTWMDGI', 'FTWNHGI', 'FTWWTHX', 'FTWRRHX', 'FTWFOHT', 'FTWHWHW', 'DFWSWHT', 'FTWFCHX', 'FTWFHHX', 'FTWSOHW', 'DFWHCGI', 'DALHTHX', 'DFWBDHT', 'FTWBRHX', 'FTWBFHW', 'DALCXGI', 'DALATHX', 'DALAGHW', 'DALETHX', 'DFWARGI', 'ARLAHHF', 'DALARHW', 'FTWAAGI', 'DFWSADT', 'DFWGNRU', 'FTWHSHX', 'FTWMFHX', 'DFWGDHX', 'DFWASHX', 'DFWSLHF', 'DFWGRGI', 'FTWTRHW', 'FTWTCHX', 'DFWNLHT', 'DALEMES', 'DFWAHHF', 'DALGPHX', 'DALHWHW', 'DALADHX', 'DALAHGI', 'DFWHTHT', 'DALASHW', 'FTWCLHX', 'DFWCLRU', 'DALLFES', 'DALPPHX', 'DALCKHX', 'DFWDEHX' ]; const visibleCtyhocns = [ ['FTWFWHF', '$199', 199, 32.752735, -97.329285, 0.28, 'HI', 'Hilton Fort Worth', '815 Main St', 'Fort Worth'], [ 'FTWESES', '$172', 172, 32.75383, -97.33004, 0.36, 'ES', 'Embassy Suites by Hilton Fort Worth Downtown', '600 Commerce Street', 'Fort Worth' ], [ 'ARLAHHF', '$140', 140, 32.7618, -97.0676, 15.23, 'HI', 'Hilton Arlington', '2401 East Lamar Boulevard', 'Arlington' ], [ 'DFWSADT', '$119', 119, 32.77338049, -97.06348126, 15.54, 'DT', 'DoubleTree by Hilton Hotel Arlington DFW South', '1507 North Watson Road', 'Arlington' ], [ 'DFWSLHF', '$163', 163, 32.9477, -97.1301, 17.97, 'HI', 'Hilton Dallas/Southlake Town Square', '1400 Plaza Place', 'Southlake' ], [ 'DFWAHHF', '$134', 134, 32.959417, -97.046009, 21.96, 'HI', 'Hilton DFW Lakes Executive Conference Center', '1800 Highway 26E', 'Grapevine' ], [ 'DALLFES', '$122', 122, 32.861343, -96.853394, 28.71, 'ES', 'Embassy Suites by Hilton Dallas Love Field', '3880 West Northwest Highway', 'Dallas' ] ]; const { general } = state const newState = { ...state, general: { ...general, retrievedCtyhocns, visibleCtyhocns } }
Using Object.assign
const state = { general: { activeFilterCount: 3, activeCtyhocn: null, activeHotel: null, filters: { amenities: { freeBreakfast: false, eveningReception: false, freeParking: false, freeWifi: true, nonSmoking: false, digitalKey: true, concierge: true, spa: false, golf: false, tennisCourt: false, resort: false, airportShuttle: false, executiveLounge: false, dining: false, indoorPool: false, outdoorPool: false, fitnessCenter: false, petsAllowed: false, roomService: false, businessCenter: false, meetingRooms: false, petsNotAllowed: false }, brands: { PY: false, CH: false, QQ: false, DT: false, ES: false, HI: false, GI: false, HP: false, HT: false, HW: false, UA: false, UP: false, RU: false, WA: false } }, name: 'Fort Worth, TX, USA', retrievedCtyhocns: [ 'FTWDTHX', 'FTWFWHF', 'FTWESES', 'FTWMCHW', 'FTWMDGI', 'FTWNHGI', 'FTWWTHX', 'FTWRRHX', 'FTWFOHT', 'FTWHWHW', 'DFWSWHT', 'FTWFCHX', 'FTWFHHX', 'FTWSOHW', 'DFWHCGI', 'DALHTHX', 'DFWBDHT', 'FTWBRHX', 'FTWBFHW', 'DALCXGI', 'DALATHX', 'DALAGHW', 'DALETHX', 'DFWARGI', 'ARLAHHF', 'DALARHW', 'FTWAAGI', 'DFWSADT', 'DFWGNRU', 'FTWHSHX', 'FTWMFHX', 'DFWGDHX', 'DFWASHX', 'DFWSLHF', 'DFWGRGI', 'FTWTRHW', 'FTWTCHX', 'DFWNLHT', 'DALEMES', 'DFWAHHF', 'DALGPHX', 'DALHWHW', 'DALADHX', 'DALAHGI', 'DFWHTHT', 'DALASHW', 'FTWCLHX' ], visibleCtyhocns: [ ['FTWFWHF', '$199', 199, 32.752735, -97.329285, 0.28, 'HI', 'Hilton Fort Worth', '815 Main St', 'Fort Worth'], [ 'DFWSADT', '$119', 119, 32.77338049, -97.06348126, 15.54, 'DT', 'DoubleTree by Hilton Hotel Arlington DFW South', '1507 North Watson Road', 'Arlington' ], [ 'DFWSLHF', '$163', 163, 32.9477, -97.1301, 17.97, 'HI', 'Hilton Dallas/Southlake Town Square', '1400 Plaza Place', 'Southlake' ] ], prevActiveCtyhocn: null, selectSource: null }, list: { canPageBackward: false, canPageForward: true, currentPage: 1, pageAmount: 20, pages: [ [ { _id: 'FTWFWHF', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'fitnessCenter', 'businessCenter', 'digitalKey', 'concierge', 'executiveLounge', 'roomService', 'meetingRooms', 'petsNotAllowed' ], brandCode: 'HI', chainCode: 'HF', ctyhocn: 'FTWFWHF', currencyCode: 'USD', distance: 0.28, distanceFmt: '0.28 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/ftwfwhf-hilton-fort-worth/', homepageUrl: 'https://www3-stg.hilton.com/en/hotels/texas/hilton-fort-worth-FTWFWHF/index.html', name: 'Hilton Fort Worth', phoneNumber: '+1-817-870-2100', propCode: 'FTWFW', resSystem: 'H', address: { addressFmt: '815 Main St, Fort Worth, Texas, 76102, USA', addressLine1: '815 Main St', addressLine2: null, city: 'Fort Worth', country: 'US', countryName: 'USA', postalCode: '76102', primeCity: 'Fort Worth', state: 'TX', stateName: 'Texas', _id: 'd628a2a37e89e370405be06efe460096058f26005972df9946ce1eea3e632945', __typename: 'HotelAddress' }, coordinate: { latitude: 32.752735, latitudeFmt: '32.75', longitude: -97.329285, longitudeFmt: '-97.33', __typename: 'HotelCoordinate' }, thumbImage: { _id: 'c03728853a3d91f7cf7cc339ef27cdec78afba4c9db6e7aa814042a1d82125ca', alt: 'Hilton Fort Worth, TX Hotel - Exterior', caption: 'Registered as a national historic landmark, the Hilton Fort Worth hotel has welcomed many famous and important guests to Cowtown.', dcrId: 2651842, src: 'https://secure3-stg.hilton.com/resources/media/hi/FTWFWHF/en_US/img/hotel/information/HH_exterior01_188x150_FitToBoxSmallDimension_Center.jpg', title: 'Exterior ', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/hi/FTWFWHF/en_US/img/hotel/information/HH_exterior01_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: 'a4477a0ab6437f19e20882f6a30d7ff3f0c5175788117987ffb79d75f7e2acc4', lowest: { _id: '53ed909da69e71ea8ef60f508020616a5bb71cf8ba59aa50fed77a1ccc4147bf', rateAmount: 199, rateAmountFmt: '$199', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' }, { _id: 'DFWSADT', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'freeParking', 'outdoorPool', 'fitnessCenter', 'businessCenter', 'digitalKey', 'concierge', 'roomService', 'meetingRooms', 'petsNotAllowed' ], brandCode: 'DT', chainCode: 'DH', ctyhocn: 'DFWSADT', currencyCode: 'USD', distance: 15.54, distanceFmt: '15.54 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/dfwsadt-doubletree-arlington-dfw-south/', homepageUrl: 'https://doubletree3-stg.hilton.com/en/hotels/texas/doubletree-by-hilton-hotel-arlington-dfw-south-DFWSADT/index.html', name: 'DoubleTree by Hilton Hotel Arlington DFW South', phoneNumber: '+1-817-640-7712', propCode: 'DFWSA', resSystem: 'P', address: { addressFmt: '1507 North Watson Road, Arlington, Texas, 76006, USA', addressLine1: '1507 North Watson Road', addressLine2: null, city: 'Arlington', country: 'US', countryName: 'USA', postalCode: '76006', primeCity: 'Arlington', state: 'TX', stateName: 'Texas', _id: '832c7b12536e175b005714b6e9c09483ab638b233470ef85aa42840724132424', __typename: 'HotelAddress' }, coordinate: { latitude: 32.77338049, latitudeFmt: '32.77', longitude: -97.06348126, longitudeFmt: '-97.06', __typename: 'HotelCoordinate' }, thumbImage: { _id: '436e6a948404bbcf301d10e8a126bb84f3ddc74abdd1ae6667e2382bd2afe1d5', alt: 'Doubletree by Hilton Hotel Arlington DFW South, TX - Exterior', caption: 'For your convenience, the hotel offers a complimentary shuttle to DFW Airport, just 15 minutes away.', dcrId: 2730565, src: 'https://secure3-stg.hilton.com/resources/media/dt/DFWSADT/en_US/img/hotel/information/DT_exterior_188x150_FitToWidth_Center.jpg', title: 'Day Exterior with Shuttle', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/dt/DFWSADT/en_US/img/hotel/information/DT_exterior_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: '12255697820765a505ffb1d577f1c064d55606005166e41b64b80191d2f805d9', lowest: { _id: 'dfe34c873230acbc8ea37cbae9919e8aa8c6fa3605db8d144a29a2ff720b96a4', rateAmount: 119, rateAmountFmt: '$119', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' }, { _id: 'DFWSLHF', amenityIds: [ 'freeWifi', 'nonSmoking', 'dining', 'outdoorPool', 'freeParking', 'fitnessCenter', 'businessCenter', 'petsAllowed', 'digitalKey', 'concierge', 'executiveLounge', 'roomService', 'meetingRooms' ], brandCode: 'HI', chainCode: 'HF', ctyhocn: 'DFWSLHF', currencyCode: 'USD', distance: 17.97, distanceFmt: '17.97 miles', homeUrl: 'https://www.stg.hilton.com/en/hotels/dfwslhf-hilton-dallas-southlake-town-square/', homepageUrl: 'https://www3-stg.hilton.com/en/hotels/texas/hilton-dallas-southlake-town-square-DFWSLHF/index.html', name: 'Hilton Dallas/Southlake Town Square', phoneNumber: '+1-817-442-9900', propCode: 'DFWSL', resSystem: 'H', address: { addressFmt: '1400 Plaza Place, Southlake, Texas, 76092, USA', addressLine1: '1400 Plaza Place', addressLine2: null, city: 'Southlake', country: 'US', countryName: 'USA', postalCode: '76092', primeCity: 'Dallas', state: 'TX', stateName: 'Texas', _id: 'cfe1e283a8e78d14e5aee6b7b5be4acf21ba23639ecc34d8e1c36507bf375f04', __typename: 'HotelAddress' }, coordinate: { latitude: 32.9477, latitudeFmt: '32.95', longitude: -97.1301, longitudeFmt: '-97.13', __typename: 'HotelCoordinate' }, thumbImage: { _id: 'bcc9a520d8b4e95df642351ce3d5475e30341fed9d234ea0eb12c66d44e96452', alt: 'Hilton Dallas/Southlake Town Square, TX - Exterior', caption: 'Welcome to the Hilton Dallas/ Southlake Town Square', dcrId: 2927901, src: 'https://secure3-stg.hilton.com/resources/media/hi/DFWSLHF/en_US/img/hotel/information/HH_flowerext_188x150_FitToWidth_Center.jpg', title: 'Exterior', hiResSrc: 'https://images.stg.hiltonstatic.com/resources/media/hi/DFWSLHF/en_US/img/hotel/information/HH_flowerext_2752x2240_FitToBoxSmallDimension_Center.jpg?impolicy=resize&rw=612&rh=430', __typename: 'HotelThumbImage' }, leadRate: { _id: '8e686838bdefb23a60bfdf9b70965bdbe91b7235a148ed2fcb844026b2ac3fcb', lowest: { _id: '2efeb5d35c99566e77b18ae9ef47f1333077eca2077e7b02ed0377a05f8502f5', rateAmount: 163, rateAmountFmt: '$163', __typename: 'HotelLeadRoomRate' }, __typename: 'HotelLeadRateSummary' }, __typename: 'HotelSummary' } ] ], sortBy: 'DISTANCE' }, map: { bounds: { south: 32.15815713288108, west: -97.97675571386719, north: 33.30078763262553, east: -96.80259189550782 }, center: { lng: -97.32924899999999, lat: 32.74863 }, initialZoom: 10, markerLimit: 200, showFullMarkers: true }, network: { canFetchMore: true, fetchAmountInitial: 3, fetchAmountMore: 5, isLoadingInitial: false, isLoadingMore: false, nextCursor: 'eyJvZmZzZXQiOjUsImxpbWl0Ijo1fQ==', prevCursor: null, shouldFetchMore: false } }; const retrievedCtyhocns = [ 'FTWDTHX', 'FTWFWHF', 'FTWESES', 'FTWMCHW', 'FTWMDGI', 'FTWNHGI', 'FTWWTHX', 'FTWRRHX', 'FTWFOHT', 'FTWHWHW', 'DFWSWHT', 'FTWFCHX', 'FTWFHHX', 'FTWSOHW', 'DFWHCGI', 'DALHTHX', 'DFWBDHT', 'FTWBRHX', 'FTWBFHW', 'DALCXGI', 'DALATHX', 'DALAGHW', 'DALETHX', 'DFWARGI', 'ARLAHHF', 'DALARHW', 'FTWAAGI', 'DFWSADT', 'DFWGNRU', 'FTWHSHX', 'FTWMFHX', 'DFWGDHX', 'DFWASHX', 'DFWSLHF', 'DFWGRGI', 'FTWTRHW', 'FTWTCHX', 'DFWNLHT', 'DALEMES', 'DFWAHHF', 'DALGPHX', 'DALHWHW', 'DALADHX', 'DALAHGI', 'DFWHTHT', 'DALASHW', 'FTWCLHX', 'DFWCLRU', 'DALLFES', 'DALPPHX', 'DALCKHX', 'DFWDEHX' ]; const visibleCtyhocns = [ ['FTWFWHF', '$199', 199, 32.752735, -97.329285, 0.28, 'HI', 'Hilton Fort Worth', '815 Main St', 'Fort Worth'], [ 'FTWESES', '$172', 172, 32.75383, -97.33004, 0.36, 'ES', 'Embassy Suites by Hilton Fort Worth Downtown', '600 Commerce Street', 'Fort Worth' ], [ 'ARLAHHF', '$140', 140, 32.7618, -97.0676, 15.23, 'HI', 'Hilton Arlington', '2401 East Lamar Boulevard', 'Arlington' ], [ 'DFWSADT', '$119', 119, 32.77338049, -97.06348126, 15.54, 'DT', 'DoubleTree by Hilton Hotel Arlington DFW South', '1507 North Watson Road', 'Arlington' ], [ 'DFWSLHF', '$163', 163, 32.9477, -97.1301, 17.97, 'HI', 'Hilton Dallas/Southlake Town Square', '1400 Plaza Place', 'Southlake' ], [ 'DFWAHHF', '$134', 134, 32.959417, -97.046009, 21.96, 'HI', 'Hilton DFW Lakes Executive Conference Center', '1800 Highway 26E', 'Grapevine' ], [ 'DALLFES', '$122', 122, 32.861343, -96.853394, 28.71, 'ES', 'Embassy Suites by Hilton Dallas Love Field', '3880 West Northwest Highway', 'Dallas' ] ]; const general = Object.assign(state.general, { retrievedCtyhocns, visibleCtyhocns }) const newState = Object.assign(state, { general })
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Using the spread operator
Using Object.assign
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're trying to analyze some performance test data. To answer your question, it appears that there are two tests being run: one using `Object.assign` and another using the spread operator (`{...}`). The benchmark results show that: * The "Using Object.assign" test has an average executions per second of 1125113.375. * The "Using the spread operator" test has an average executions per second of 410423.3125. It's worth noting that these numbers are quite different, suggesting a significant performance difference between the two approaches. However, without more context or information about the specific implementation and use cases for each test, it's difficult to say which approach is "better" or why there might be such a large performance gap. If you'd like to discuss further or ask more questions, feel free!
Related benchmarks:
Division by 1000 vs bitwise shifting approximation (1024)
Math.round vs Bitwise
toFixed vs toPrecision vs Math.round() Equality Comparisons
Math.round vs Number.isInteger
ParseInt vs conditional ~~ vs toFixed
Comments
Confirm delete:
Do you really want to delete benchmark?