Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
testSpeed3
(version: 4)
tetwst
Comparing performance of:
de vs an vs cp vs deep oo vs an00 copy vs cp00
Created:
7 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="//cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script>
Script Preparation code:
var MyObject = [ { "_id": "5b468d7297994da089ebf52e", "index": 0, "guid": "d3d36b68-9e0b-461e-8b4c-3f216e800a55", "isActive": false, "balance": "$1,052.55", "picture": "http://placehold.it/32x32", "age": 39, "eyeColor": "blue", "name": "Janelle Bailey", "gender": "female", "company": "SLOGANAUT", "email": "janellebailey@sloganaut.com", "phone": "+1 (941) 519-3895", "address": "652 Decatur Street, Nord, Kentucky, 9888", "about": "Ea in elit deserunt in culpa. In nisi reprehenderit sunt dolor voluptate magna irure do reprehenderit duis ad sit magna deserunt. Ex pariatur anim dolore ea ex qui eu adipisicing nisi adipisicing voluptate. Ipsum quis tempor cupidatat duis amet ea Lorem duis velit laboris culpa ea reprehenderit cupidatat. Cupidatat occaecat mollit adipisicing ea veniam non minim sunt culpa eu ipsum.\r\n", "registered": "2017-12-22T10:06:40 -13:00", "latitude": -78.640337, "longitude": 79.909725, "tags": [ "deserunt", "occaecat", "nostrud", "quis", "dolor", "sint", "cillum" ], "friends": [ { "id": 0, "name": "Morales Hogan" }, { "id": 1, "name": "Louisa Hamilton" }, { "id": 2, "name": "Page Carroll" } ], "greeting": "Hello, Janelle Bailey! You have 4 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72f211f77bd53d170d", "index": 1, "guid": "4d8cf5aa-0cd3-4694-b7be-0849644c43eb", "isActive": true, "balance": "$3,858.76", "picture": "http://placehold.it/32x32", "age": 38, "eyeColor": "blue", "name": "Dianne Battle", "gender": "female", "company": "COMFIRM", "email": "diannebattle@comfirm.com", "phone": "+1 (814) 438-2608", "address": "240 Lincoln Place, Moscow, North Dakota, 4483", "about": "Enim id anim sit sint excepteur. Culpa laborum et incididunt ad consectetur aliqua excepteur minim sunt labore cupidatat voluptate minim. Dolor veniam ullamco non magna aute culpa do occaecat culpa.\r\n", "registered": "2017-06-02T09:47:06 -12:00", "latitude": 28.620131, "longitude": -161.748829, "tags": [ "nulla", "sit", "et", "reprehenderit", "commodo", "duis", "eiusmod" ], "friends": [ { "id": 0, "name": "Jocelyn Webb" }, { "id": 1, "name": "Francis Frank" }, { "id": 2, "name": "Annabelle Morton" } ], "greeting": "Hello, Dianne Battle! You have 10 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72ad697ba2dfc01891", "index": 2, "guid": "a7ec62f0-28b1-42cc-ba4a-920fed02b72e", "isActive": false, "balance": "$1,015.32", "picture": "http://placehold.it/32x32", "age": 35, "eyeColor": "green", "name": "Nikki Hodges", "gender": "female", "company": "INSURETY", "email": "nikkihodges@insurety.com", "phone": "+1 (880) 507-2865", "address": "156 Moffat Street, Lawrence, Texas, 1157", "about": "Aute dolor sunt minim voluptate pariatur voluptate aliquip esse. Eiusmod irure est cupidatat id irure sint magna excepteur. Anim sit officia commodo occaecat.\r\n", "registered": "2016-07-20T04:48:43 -12:00", "latitude": -29.074214, "longitude": -8.028379, "tags": [ "id", "est", "est", "nisi", "exercitation", "enim", "labore" ], "friends": [ { "id": 0, "name": "Elena Levy" }, { "id": 1, "name": "Joni Branch" }, { "id": 2, "name": "Hahn Savage" } ], "greeting": "Hello, Nikki Hodges! You have 8 unread messages.", "favoriteFruit": "apple" }, { "_id": "5b468d72aa751df7e8f11d77", "index": 3, "guid": "5ca98fca-321d-4c7b-8bc7-3d80174b37fd", "isActive": true, "balance": "$3,550.49", "picture": "http://placehold.it/32x32", "age": 24, "eyeColor": "blue", "name": "Hull Haley", "gender": "male", "company": "VIXO", "email": "hullhaley@vixo.com", "phone": "+1 (863) 475-3334", "address": "270 Grand Avenue, Lafferty, Alaska, 9792", "about": "Non commodo pariatur aliquip ex reprehenderit pariatur Lorem in duis dolor in ad commodo minim. Tempor sit enim et exercitation do voluptate nostrud aliqua magna. Magna deserunt qui occaecat aute fugiat exercitation sit deserunt consectetur aliqua. Duis sit Lorem ad ad cupidatat ea labore sint dolore sit duis. Tempor qui non enim eiusmod non consectetur officia dolore est deserunt. Minim ea exercitation id reprehenderit elit eiusmod magna tempor consectetur. Et commodo do ullamco excepteur commodo cillum ut do adipisicing.\r\n", "registered": "2016-10-01T11:26:36 -13:00", "latitude": -2.02977, "longitude": -172.735554, "tags": [ "excepteur", "laborum", "eiusmod", "exercitation", "laborum", "labore", "aliquip" ], "friends": [ { "id": 0, "name": "Leigh Hays" }, { "id": 1, "name": "Taylor Gregory" }, { "id": 2, "name": "Lolita Shaw" } ], "greeting": "Hello, Hull Haley! You have 8 unread messages.", "favoriteFruit": "strawberry" }, { "_id": "5b468d724aae969110291af0", "index": 4, "guid": "3c5fa58d-9ec9-4a06-941d-c27f1ae3ca84", "isActive": false, "balance": "$2,053.98", "picture": "http://placehold.it/32x32", "age": 30, "eyeColor": "brown", "name": "Candace Terrell", "gender": "female", "company": "EYERIS", "email": "candaceterrell@eyeris.com", "phone": "+1 (931) 404-2320", "address": "466 Grant Avenue, Noxen, Iowa, 2902", "about": "Deserunt labore tempor mollit aliquip ullamco amet. Et dolor pariatur dolore dolore sit qui ad eu ullamco laborum aute. Adipisicing excepteur id quis elit ullamco ex deserunt non duis ut ullamco fugiat adipisicing.\r\n", "registered": "2016-04-10T06:40:11 -12:00", "latitude": -16.63315, "longitude": -71.036295, "tags": [ "exercitation", "sint", "exercitation", "veniam", "do", "ad", "consectetur" ], "friends": [ { "id": 0, "name": "Mariana Conley" }, { "id": 1, "name": "Margarita Pate" }, { "id": 2, "name": "Bradford Mullins" } ], "greeting": "Hello, Candace Terrell! You have 3 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72db112b54c36b9530", "index": 5, "guid": "65f848aa-d41a-42a6-a457-43203116531a", "isActive": true, "balance": "$3,180.62", "picture": "http://placehold.it/32x32", "age": 31, "eyeColor": "brown", "name": "Acosta Christensen", "gender": "male", "company": "BUZZMAKER", "email": "acostachristensen@buzzmaker.com", "phone": "+1 (960) 474-3081", "address": "334 Hall Street, Brazos, California, 3451", "about": "Excepteur mollit cillum ullamco amet proident nulla labore officia tempor proident. Sunt est cupidatat minim sint irure ad consequat et aliquip pariatur. Nulla adipisicing occaecat sit commodo. Sit sint consectetur nostrud culpa sunt qui deserunt fugiat ea tempor exercitation ullamco. Eiusmod duis officia sunt incididunt id id eiusmod eu nostrud.\r\n", "registered": "2017-05-27T05:19:34 -12:00", "latitude": 48.427794, "longitude": -48.814398, "tags": [ "ullamco", "nulla", "ut", "tempor", "labore", "ullamco", "nostrud" ], "friends": [ { "id": 0, "name": "Ila Miller" }, { "id": 1, "name": "Queen Walton" }, { "id": 2, "name": "Kent Whitaker" } ], "greeting": "Hello, Acosta Christensen! You have 9 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d720cd99e53ea871d5a", "index": 6, "guid": "8ce254ae-120c-4e72-9ffc-82de2415e813", "isActive": false, "balance": "$1,671.31", "picture": "http://placehold.it/32x32", "age": 25, "eyeColor": "brown", "name": "Hallie Calhoun", "gender": "female", "company": "FRANSCENE", "email": "halliecalhoun@franscene.com", "phone": "+1 (809) 542-2575", "address": "417 Stillwell Avenue, Toftrees, Maine, 974", "about": "Aliqua nulla sit mollit Lorem sit reprehenderit esse id do cillum eu. Sit adipisicing qui nostrud ullamco incididunt incididunt adipisicing Lorem proident proident ipsum nulla est esse. Veniam aliqua Lorem nostrud velit pariatur ea ad. Velit cillum exercitation sit mollit adipisicing magna culpa incididunt eu labore nisi do. Minim tempor commodo reprehenderit nisi ad ut aliquip nostrud commodo non laborum veniam qui.\r\n", "registered": "2018-02-02T02:01:43 -13:00", "latitude": 4.361665, "longitude": 45.411987, "tags": [ "fugiat", "magna", "occaecat", "ut", "amet", "labore", "ea" ], "friends": [ { "id": 0, "name": "Hodges Collier" }, { "id": 1, "name": "Wanda Stanley" }, { "id": 2, "name": "Noemi Torres" } ], "greeting": "Hello, Hallie Calhoun! You have 8 unread messages.", "favoriteFruit": "strawberry" }, { "_id": "5b468d72404fcf03759c2353", "index": 7, "guid": "a85b75b7-1908-4e18-982d-fc66951472e5", "isActive": false, "balance": "$1,958.71", "picture": "http://placehold.it/32x32", "age": 21, "eyeColor": "brown", "name": "Danielle Cochran", "gender": "female", "company": "AUSTECH", "email": "daniellecochran@austech.com", "phone": "+1 (995) 572-2450", "address": "386 Metrotech Courtr, Lowgap, Indiana, 4908", "about": "Velit esse occaecat laborum ullamco ullamco laborum duis eiusmod tempor id laboris fugiat voluptate elit. Proident laboris dolor pariatur cillum incididunt in dolor. Id ut laborum aliqua est enim consectetur eu.\r\n", "registered": "2017-07-25T01:02:55 -12:00", "latitude": -81.664816, "longitude": -96.666603, "tags": [ "amet", "ad", "culpa", "ea", "occaecat", "nostrud", "laborum" ], "friends": [ { "id": 0, "name": "Rogers Warner" }, { "id": 1, "name": "Morrow Eaton" }, { "id": 2, "name": "Avis Griffith" } ], "greeting": "Hello, Danielle Cochran! You have 1 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72cfb7cb154b519399", "index": 8, "guid": "e41935b2-2b0e-49a3-9a3c-d00df9586da1", "isActive": true, "balance": "$3,162.15", "picture": "http://placehold.it/32x32", "age": 24, "eyeColor": "brown", "name": "Cain Holt", "gender": "male", "company": "FARMAGE", "email": "cainholt@farmage.com", "phone": "+1 (950) 489-3524", "address": "818 Seigel Court, Snelling, New Jersey, 7590", "about": "Pariatur non sit nisi duis magna aute do. Commodo aute consequat enim aute ipsum consectetur et duis in. Labore sint pariatur excepteur nisi nostrud sint occaecat nostrud ad nisi fugiat. Nostrud veniam excepteur ipsum anim. Deserunt incididunt elit commodo labore fugiat excepteur officia veniam anim. Ex est fugiat sint cillum sit do ullamco consectetur anim ex exercitation excepteur.\r\n", "registered": "2018-01-03T05:38:59 -13:00", "latitude": -71.926325, "longitude": 173.568276, "tags": [ "elit", "aute", "amet", "in", "ex", "cillum", "irure" ], "friends": [ { "id": 0, "name": "Morin Mitchell" }, { "id": 1, "name": "Valentine Mcknight" }, { "id": 2, "name": "Matthews Snow" } ], "greeting": "Hello, Cain Holt! You have 10 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72f27e5bea499714e3", "index": 9, "guid": "fd6d38d2-ff9a-454c-ae5c-b0e8d9973eeb", "isActive": false, "balance": "$3,406.47", "picture": "http://placehold.it/32x32", "age": 25, "eyeColor": "brown", "name": "Cox Bradley", "gender": "male", "company": "INRT", "email": "coxbradley@inrt.com", "phone": "+1 (982) 412-3014", "address": "199 Arlington Place, Fowlerville, West Virginia, 969", "about": "Non enim labore veniam dolore ullamco eiusmod pariatur labore enim mollit laboris occaecat. Deserunt aliqua aliqua fugiat occaecat voluptate sit sunt ut laborum anim velit ut id. Enim magna ullamco exercitation irure adipisicing do amet exercitation duis id quis do qui adipisicing. Ut ad ad exercitation est culpa nisi dolor ea laboris id id.\r\n", "registered": "2016-08-04T01:49:29 -12:00", "latitude": -56.637105, "longitude": 61.843749, "tags": [ "et", "exercitation", "reprehenderit", "commodo", "eiusmod", "et", "velit" ], "friends": [ { "id": 0, "name": "Kaufman Tanner" }, { "id": 1, "name": "David Bridges" }, { "id": 2, "name": "Powers Miranda" } ], "greeting": "Hello, Cox Bradley! You have 6 unread messages.", "favoriteFruit": "apple" }, { "_id": "5b468d72008cee1251277790", "index": 10, "guid": "1fdffbca-83ba-4132-8e9e-3e32f1360d01", "isActive": true, "balance": "$3,719.62", "picture": "http://placehold.it/32x32", "age": 37, "eyeColor": "brown", "name": "Richardson Reeves", "gender": "male", "company": "XANIDE", "email": "richardsonreeves@xanide.com", "phone": "+1 (911) 548-2348", "address": "641 Ryder Avenue, Jeff, Mississippi, 7143", "about": "Ex pariatur id voluptate consequat consequat ad dolore fugiat commodo sint. Consequat laborum dolore nulla pariatur ipsum officia irure reprehenderit et quis. In aliquip reprehenderit magna elit culpa adipisicing sint ea dolore ut tempor velit do ut. Enim nulla exercitation irure aute duis nulla duis consectetur. Labore ullamco anim Lorem ipsum exercitation minim commodo esse excepteur labore laboris.\r\n", "registered": "2017-06-24T09:00:28 -12:00", "latitude": 2.757017, "longitude": 123.605671, "tags": [ "do", "in", "adipisicing", "velit", "ad", "Lorem", "eu" ], "friends": [ { "id": 0, "name": "Rebecca Floyd" }, { "id": 1, "name": "Denise Owens" }, { "id": 2, "name": "Jacobson Brooks" } ], "greeting": "Hello, Richardson Reeves! You have 10 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d72df3cceac878e678a", "index": 11, "guid": "240e0399-6e78-4b24-98b3-bd1626b179ca", "isActive": true, "balance": "$1,701.13", "picture": "http://placehold.it/32x32", "age": 30, "eyeColor": "green", "name": "Ellis Randall", "gender": "male", "company": "NEWCUBE", "email": "ellisrandall@newcube.com", "phone": "+1 (987) 401-2791", "address": "207 Gates Avenue, Dalton, Maryland, 9379", "about": "Quis deserunt proident ea reprehenderit nulla irure est ex consectetur aute est proident reprehenderit. Exercitation fugiat adipisicing duis exercitation elit aliquip. Culpa aute ipsum labore commodo sunt proident elit elit exercitation quis occaecat laborum. Velit labore officia ex adipisicing reprehenderit aliqua pariatur est minim id fugiat quis enim. Nulla amet eiusmod amet veniam culpa reprehenderit eiusmod eu. Est officia consectetur velit minim aute labore Lorem ut ex eu anim culpa sit eu. Duis ea eiusmod culpa laborum non.\r\n", "registered": "2016-05-29T01:33:13 -12:00", "latitude": -87.579132, "longitude": -7.739569, "tags": [ "est", "culpa", "elit", "irure", "mollit", "exercitation", "est" ], "friends": [ { "id": 0, "name": "Kendra Finch" }, { "id": 1, "name": "Vanessa Ward" }, { "id": 2, "name": "Earline Mays" } ], "greeting": "Hello, Ellis Randall! You have 2 unread messages.", "favoriteFruit": "banana" }, { "_id": "5b468d727d831662e4a4d592", "index": 12, "guid": "e481bf24-3788-448b-a962-6af1873b4a30", "isActive": true, "balance": "$3,045.32", "picture": "http://placehold.it/32x32", "age": 35, "eyeColor": "brown", "name": "Jamie Ratliff", "gender": "female", "company": "BIOTICA", "email": "jamieratliff@biotica.com", "phone": "+1 (879) 568-2396", "address": "900 Carroll Street, Greer, Vermont, 682", "about": "Veniam commodo tempor irure amet sint ad ut laboris eiusmod dolore enim proident. Nulla labore cupidatat eu eu ea sint dolor nulla. Aliqua laborum non occaecat enim nostrud nostrud anim cillum reprehenderit anim. Cillum ut pariatur esse incididunt nostrud eiusmod. Est et excepteur ut ullamco laborum aliqua mollit commodo aliquip elit esse. Deserunt laborum nostrud pariatur elit nulla reprehenderit fugiat reprehenderit. Minim et nisi ex elit consectetur sit mollit reprehenderit anim sit.\r\n", "registered": "2015-06-23T02:46:00 -12:00", "latitude": -74.900418, "longitude": 20.705979, "tags": [ "veniam", "ut", "sit", "ad", "in", "dolor", "eu" ], "friends": [ { "id": 0, "name": "Dennis Weber" }, { "id": 1, "name": "Barlow Dean" }, { "id": 2, "name": "Wells Keith" } ], "greeting": "Hello, Jamie Ratliff! You have 10 unread messages.", "favoriteFruit": "apple" }, { "_id": "5b468d72ed5c1c643c741656", "index": 13, "guid": "769ac004-2fa0-4301-bcc6-3614687f9d3c", "isActive": true, "balance": "$2,360.63", "picture": "http://placehold.it/32x32", "age": 39, "eyeColor": "green", "name": "Sheppard Stanton", "gender": "male", "company": "CEDWARD", "email": "sheppardstanton@cedward.com", "phone": "+1 (807) 449-3917", "address": "464 Commercial Street, Sterling, Kansas, 7453", "about": "Commodo aliquip quis ea cupidatat nisi fugiat dolore aliquip tempor est nostrud. Sunt proident laborum adipisicing non magna est qui. Laborum amet ullamco velit eu ad dolor. Ipsum ullamco labore anim magna aliquip Lorem. Velit enim id in esse duis non qui laborum officia ullamco veniam nulla minim. Et consequat amet esse laborum ex officia velit dolor Lorem proident amet magna ad magna. Quis eu culpa laborum ea tempor dolor cupidatat.\r\n", "registered": "2015-08-01T03:53:50 -12:00", "latitude": -53.103576, "longitude": 58.51251, "tags": [ "exercitation", "sint", "non", "aliquip", "amet", "do", "est" ], "friends": [ { "id": 0, "name": "Valenzuela Banks" }, { "id": 1, "name": "Cooley Ellison" }, { "id": 2, "name": "Deleon Barnett" } ], "greeting": "Hello, Sheppard Stanton! You have 3 unread messages.", "favoriteFruit": "strawberry" }, { "_id": "5b468d722bd7d5b8da3e0856", "index": 14, "guid": "5b0e36b4-44bb-4238-951f-cb4d37aadb41", "isActive": true, "balance": "$2,349.17", "picture": "http://placehold.it/32x32", "age": 29, "eyeColor": "brown", "name": "Sandoval Weaver", "gender": "male", "company": "MAGMINA", "email": "sandovalweaver@magmina.com", "phone": "+1 (833) 505-2843", "address": "175 Bayview Place, Magnolia, Marshall Islands, 6377", "about": "Enim commodo aliquip et ea eiusmod proident consequat. Adipisicing esse laborum labore proident et culpa ex elit consequat enim laboris sunt. Est ex eiusmod velit occaecat laborum. Sunt pariatur ex in ullamco enim sit. Irure ea consequat amet aliquip Lorem irure pariatur incididunt amet ad magna. Exercitation aliquip pariatur laborum consectetur aliquip. Anim ad consectetur enim laborum incididunt culpa ea excepteur.\r\n", "registered": "2017-02-14T09:47:46 -13:00", "latitude": 45.78461, "longitude": -88.758833, "tags": [ "laboris", "cillum", "do", "eu", "mollit", "nisi", "ex" ], "friends": [ { "id": 0, "name": "Angelita Jones" }, { "id": 1, "name": "Hayes Fitzpatrick" }, { "id": 2, "name": "Gutierrez Dennis" } ], "greeting": "Hello, Sandoval Weaver! You have 6 unread messages.", "favoriteFruit": "strawberry" } ]; var arrayTest = [ "1", ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject, ["sd", "12"], MyObject ] var myCopy = null; function deepCopy(object) { // if not array or object or is null return self if (typeof object !== 'object' || object == null) { return object; } var newObject; // handle case: array if (object instanceof Array) { newObject = []; for (var index = 0, length = object.length; index < length; index++) { newObject[index] = deepCopy(object[index]); } return newObject; } // handle case: object newObject = {}; for (var property in object) { if (object.hasOwnProperty(property)) { newObject[property] = deepCopy(object[property]); } } return newObject; } function copy(object) { // if not array or object or is null return self if (typeof object !== 'object' || object == null) { return object; } var newObject = object instanceof Array?[]:{}; for (var property in object) { if (object.hasOwnProperty(property)) { newObject[property] = deepCopy(object[property]); } } return newObject; }
Tests:
de
myCopy = deepCopy(arrayTest);
an
myCopy = angular.copy(arrayTest);
cp
myCopy = copy(arrayTest);
deep oo
myCopy = deepCopy(MyObject);
an00 copy
myCopy = angular.copy(MyObject);
cp00
myCopy = copy(MyObject);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (6)
Previous results
Fork
Test case name
Result
de
an
cp
deep oo
an00 copy
cp00
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):
I'll do my best to provide an answer. Based on the provided code snippet, it appears that the `deepCopy` function is intended to recursively copy complex objects, while the `copy` function uses Angular's `angular.copy()` method for simplicity. The benchmark results suggest that: 1. The `deepCopy` function performs better on more complex objects (e.g., `MyObject`) compared to simpler ones (e.g., `arrayTest`). 2. Using Angular's `angular.copy()` method is faster than the custom `copy` function, especially for simpler objects. 3. Both methods have similar performance when dealing with simple objects like arrays. Considering these observations and without further information about the specific use case or requirements, here are some general recommendations: * For complex objects, it's recommended to use a robust implementation of deep copying, such as the `deepCopy` function provided in the code snippet. This ensures that all nested properties are properly copied, reducing potential issues with unexpected behavior. * For simpler objects, Angular's `angular.copy()` method can be a convenient and efficient choice, especially when you need to copy small, relatively simple data structures. In terms of specific actions or next steps, I would suggest: 1. Review the provided code snippet and ensure that it meets your project's requirements. 2. If you're dealing with complex objects, consider using the `deepCopy` function or a similar implementation. 3. For simpler objects, feel free to use Angular's `angular.copy()` method for its simplicity and performance benefits. Please note that without further context or details about your specific project requirements, these suggestions are general in nature. If you have more information or questions, I'll be happy to help!
Related benchmarks:
test clone
Lodash cloneDeep vs JSON Clone (Large Object 2)
test 4bc5a6e8-e19c-46c7-8c39-c70b7152fe5f
Lodash vs JSON vs Ramda vs the oooh geee
Comments
Confirm delete:
Do you really want to delete benchmark?