Cloning objects (v7)

Revision 7 of this benchmark created on


Setup

/* none, let's use a fresh object for each test instead of referencing the same one each time */

Test runner

Ready to run.

Testing in
TestOps/sec
Object.create()
const clone = Object.create({
	"3ee770f0-a52d-46aa-97ae-98d011638fd9": "3ee770f0-a52d-46aa-97ae-98d011638fd9",
	"5a177029-d548-4ba9-913b-43c412c682d2": "5a177029-d548-4ba9-913b-43c412c682d2",
	"c11367a8-c024-4fb9-8d87-5961985cba74": "c11367a8-c024-4fb9-8d87-5961985cba74",
	"b08943a8-cb1b-4ed4-a844-1124d9ac4728": "b08943a8-cb1b-4ed4-a844-1124d9ac4728",
	"8091433d-ee95-4423-aabd-ddf0d4aa14ca": "8091433d-ee95-4423-aabd-ddf0d4aa14ca",
	"ce53086f-4a2c-4255-acaf-6730965d0354": "ce53086f-4a2c-4255-acaf-6730965d0354",
	"1e7cc502-ce87-41fa-81fa-30936714ece2": "1e7cc502-ce87-41fa-81fa-30936714ece2",
	"a7b8647f-c62e-45b1-8c53-9177d836eab1": "a7b8647f-c62e-45b1-8c53-9177d836eab1",
	"640e9673-3cd7-43c2-9f4c-3b558bf94544": "640e9673-3cd7-43c2-9f4c-3b558bf94544",
	"fc37d0ee-c221-4a36-a08e-942f4502bf64": "fc37d0ee-c221-4a36-a08e-942f4502bf64",
	"23b5d1da-2aef-41f3-8aac-900942471159": "23b5d1da-2aef-41f3-8aac-900942471159",
	"42bf0ad9-25a8-452e-9ba5-605459a7becd": "42bf0ad9-25a8-452e-9ba5-605459a7becd",
	"dcc5c731-497c-463d-aac1-03639f837ee9": "dcc5c731-497c-463d-aac1-03639f837ee9",
	"65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f": "65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f",
	"e0dac8fc-5a42-4c87-9711-1dbff0bb52df": "e0dac8fc-5a42-4c87-9711-1dbff0bb52df",
	"5a2c8426-d5ff-4279-a742-c9bd1ac981ce": "5a2c8426-d5ff-4279-a742-c9bd1ac981ce",
	"588e8b1c-1d1e-4736-8e2f-e17ec069932d": "588e8b1c-1d1e-4736-8e2f-e17ec069932d",
	"4c56322f-4cc1-46a3-a108-b70257d3bab8": "4c56322f-4cc1-46a3-a108-b70257d3bab8",
	"819e527e-b078-4b12-b73b-05eee54c1b13": "819e527e-b078-4b12-b73b-05eee54c1b13",
	"7576f211-0bc5-482e-ae63-d254374e6086": "7576f211-0bc5-482e-ae63-d254374e6086",
	"07a48a07-12b2-4cd2-816a-179169db1264": "07a48a07-12b2-4cd2-816a-179169db1264",
	"f5bd0169-b217-4a10-ac58-ebb2048803a8": "f5bd0169-b217-4a10-ac58-ebb2048803a8",
	"fb91f6b9-8a47-42f6-bca2-210e1a6859d2": "fb91f6b9-8a47-42f6-bca2-210e1a6859d2",
	"a86289b8-88a6-49f4-96e5-c62470805aa9": "a86289b8-88a6-49f4-96e5-c62470805aa9",
	"95c3ce3f-22f3-4bb4-8971-9c0d225782d2": "95c3ce3f-22f3-4bb4-8971-9c0d225782d2",

})
ready
Object.assign()
const clone = Object.assign({}, {
	"3ee770f0-a52d-46aa-97ae-98d011638fd9": "3ee770f0-a52d-46aa-97ae-98d011638fd9",
	"5a177029-d548-4ba9-913b-43c412c682d2": "5a177029-d548-4ba9-913b-43c412c682d2",
	"c11367a8-c024-4fb9-8d87-5961985cba74": "c11367a8-c024-4fb9-8d87-5961985cba74",
	"b08943a8-cb1b-4ed4-a844-1124d9ac4728": "b08943a8-cb1b-4ed4-a844-1124d9ac4728",
	"8091433d-ee95-4423-aabd-ddf0d4aa14ca": "8091433d-ee95-4423-aabd-ddf0d4aa14ca",
	"ce53086f-4a2c-4255-acaf-6730965d0354": "ce53086f-4a2c-4255-acaf-6730965d0354",
	"1e7cc502-ce87-41fa-81fa-30936714ece2": "1e7cc502-ce87-41fa-81fa-30936714ece2",
	"a7b8647f-c62e-45b1-8c53-9177d836eab1": "a7b8647f-c62e-45b1-8c53-9177d836eab1",
	"640e9673-3cd7-43c2-9f4c-3b558bf94544": "640e9673-3cd7-43c2-9f4c-3b558bf94544",
	"fc37d0ee-c221-4a36-a08e-942f4502bf64": "fc37d0ee-c221-4a36-a08e-942f4502bf64",
	"23b5d1da-2aef-41f3-8aac-900942471159": "23b5d1da-2aef-41f3-8aac-900942471159",
	"42bf0ad9-25a8-452e-9ba5-605459a7becd": "42bf0ad9-25a8-452e-9ba5-605459a7becd",
	"dcc5c731-497c-463d-aac1-03639f837ee9": "dcc5c731-497c-463d-aac1-03639f837ee9",
	"65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f": "65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f",
	"e0dac8fc-5a42-4c87-9711-1dbff0bb52df": "e0dac8fc-5a42-4c87-9711-1dbff0bb52df",
	"5a2c8426-d5ff-4279-a742-c9bd1ac981ce": "5a2c8426-d5ff-4279-a742-c9bd1ac981ce",
	"588e8b1c-1d1e-4736-8e2f-e17ec069932d": "588e8b1c-1d1e-4736-8e2f-e17ec069932d",
	"4c56322f-4cc1-46a3-a108-b70257d3bab8": "4c56322f-4cc1-46a3-a108-b70257d3bab8",
	"819e527e-b078-4b12-b73b-05eee54c1b13": "819e527e-b078-4b12-b73b-05eee54c1b13",
	"7576f211-0bc5-482e-ae63-d254374e6086": "7576f211-0bc5-482e-ae63-d254374e6086",
	"07a48a07-12b2-4cd2-816a-179169db1264": "07a48a07-12b2-4cd2-816a-179169db1264",
	"f5bd0169-b217-4a10-ac58-ebb2048803a8": "f5bd0169-b217-4a10-ac58-ebb2048803a8",
	"fb91f6b9-8a47-42f6-bca2-210e1a6859d2": "fb91f6b9-8a47-42f6-bca2-210e1a6859d2",
	"a86289b8-88a6-49f4-96e5-c62470805aa9": "a86289b8-88a6-49f4-96e5-c62470805aa9",
	"95c3ce3f-22f3-4bb4-8971-9c0d225782d2": "95c3ce3f-22f3-4bb4-8971-9c0d225782d2",

})
ready
Spread
const clone = {...{
	"3ee770f0-a52d-46aa-97ae-98d011638fd9": "3ee770f0-a52d-46aa-97ae-98d011638fd9",
	"5a177029-d548-4ba9-913b-43c412c682d2": "5a177029-d548-4ba9-913b-43c412c682d2",
	"c11367a8-c024-4fb9-8d87-5961985cba74": "c11367a8-c024-4fb9-8d87-5961985cba74",
	"b08943a8-cb1b-4ed4-a844-1124d9ac4728": "b08943a8-cb1b-4ed4-a844-1124d9ac4728",
	"8091433d-ee95-4423-aabd-ddf0d4aa14ca": "8091433d-ee95-4423-aabd-ddf0d4aa14ca",
	"ce53086f-4a2c-4255-acaf-6730965d0354": "ce53086f-4a2c-4255-acaf-6730965d0354",
	"1e7cc502-ce87-41fa-81fa-30936714ece2": "1e7cc502-ce87-41fa-81fa-30936714ece2",
	"a7b8647f-c62e-45b1-8c53-9177d836eab1": "a7b8647f-c62e-45b1-8c53-9177d836eab1",
	"640e9673-3cd7-43c2-9f4c-3b558bf94544": "640e9673-3cd7-43c2-9f4c-3b558bf94544",
	"fc37d0ee-c221-4a36-a08e-942f4502bf64": "fc37d0ee-c221-4a36-a08e-942f4502bf64",
	"23b5d1da-2aef-41f3-8aac-900942471159": "23b5d1da-2aef-41f3-8aac-900942471159",
	"42bf0ad9-25a8-452e-9ba5-605459a7becd": "42bf0ad9-25a8-452e-9ba5-605459a7becd",
	"dcc5c731-497c-463d-aac1-03639f837ee9": "dcc5c731-497c-463d-aac1-03639f837ee9",
	"65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f": "65c2d5fd-a498-4ba0-bb16-fc1c26ca0e2f",
	"e0dac8fc-5a42-4c87-9711-1dbff0bb52df": "e0dac8fc-5a42-4c87-9711-1dbff0bb52df",
	"5a2c8426-d5ff-4279-a742-c9bd1ac981ce": "5a2c8426-d5ff-4279-a742-c9bd1ac981ce",
	"588e8b1c-1d1e-4736-8e2f-e17ec069932d": "588e8b1c-1d1e-4736-8e2f-e17ec069932d",
	"4c56322f-4cc1-46a3-a108-b70257d3bab8": "4c56322f-4cc1-46a3-a108-b70257d3bab8",
	"819e527e-b078-4b12-b73b-05eee54c1b13": "819e527e-b078-4b12-b73b-05eee54c1b13",
	"7576f211-0bc5-482e-ae63-d254374e6086": "7576f211-0bc5-482e-ae63-d254374e6086",
	"07a48a07-12b2-4cd2-816a-179169db1264": "07a48a07-12b2-4cd2-816a-179169db1264",
	"f5bd0169-b217-4a10-ac58-ebb2048803a8": "f5bd0169-b217-4a10-ac58-ebb2048803a8",
	"fb91f6b9-8a47-42f6-bca2-210e1a6859d2": "fb91f6b9-8a47-42f6-bca2-210e1a6859d2",
	"a86289b8-88a6-49f4-96e5-c62470805aa9": "a86289b8-88a6-49f4-96e5-c62470805aa9",
	"95c3ce3f-22f3-4bb4-8971-9c0d225782d2": "95c3ce3f-22f3-4bb4-8971-9c0d225782d2",

}}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.