Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object merge testing
(version: 0)
Comparing performance of:
lodash merge vs object.assign vs spread
Created:
7 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>
Tests:
lodash merge
var a = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":1,"favorers":[],"user_id":10208633,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var b = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":0,"favorers":[],"user_id":13961847,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var c = _.merge(a, b);
object.assign
var a = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":1,"favorers":[],"user_id":10208633,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var b = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":0,"favorers":[],"user_id":13961847,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var c = Object.assign(a, b);
spread
var a = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":1,"favorers":[],"user_id":10208633,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var b = {"retweeted":false,"porn":false,"mentioned":0,"retweetable":true,"id":1408967479,"favorite_count":0,"is_unread":0,"favorers":[],"user_id":13961847,"type":0,"bookmark":false,"coins":0,"publish_to_followers":true,"content":"line常用貼圖 ,沒有跟到活動 <img src=\"https://gif\" class=\"emoticon\" alt=\"(rofl)\" /> <br /><a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> <a href=\"https://png\" class=\"ex_link pictureservices\" rel=\"nofollow\"><img src=\"https://jpg\" alt=\"https://png\" height=\"48\"></a> 但應該都是這樣","retweet_id":null,"excluded":null,"has_gift":false,"owner_id":10208633,"responses_seen":0,"qualifier":":","tweet_id":1408967479,"response_count":1,"retweeters_count":0,"anonymous":false,"last_edited":null,"limited_to":null,"no_comments":0,"posted":"Tue, 30 Apr 2019 04:20:50 GMT","lang":"en","content_raw":"line常用貼圖 ,沒有跟到活動 (rofl) \n 但應該都是這樣","retweeters":[],"favorite":false,"responded":0,"trans_qualifier":":"}; var c = { ...a, ...b };
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
lodash merge
object.assign
spread
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):
A technical question! It seems like you're asking me to extract some information from the provided JSON data. Specifically, I'll extract the test results for each benchmark: 1. `object.assign`: * Executions per second: 1164854.5 2. `lodash merge`: * Executions per second: 330251.0625 3. `spread`: * Executions per second: 293499.71875 Is that what you were looking for?
Related benchmarks:
lodash merge vs object.assign vs spread 3
Array Properties Merge: Lodash merge vs Object.assign
lodash merge vs object.assign vs spread (v2)
lodash merge vs object.assign vs spread (v3)
Lodash merge vs mergedeep 1
Comments
Confirm delete:
Do you really want to delete benchmark?