oekazuma / svelte-meta-tags

Svelte Meta Tags provides components designed to help you manage SEO for Svelte projects.
MIT License
536 stars 24 forks source link

Refactored deepMerge function to improve performance #1211

Closed oekazuma closed 1 month ago

oekazuma commented 1 month ago
Test Case Before (ops/sec) After (ops/sec) Improvement Factor
deepMerge with simple objects 1,277,217.11 2,764,205.70 2.16x
deepMerge with nested objects 696,393.92 1,279,440.35 1.84x
deepMerge with arrays 1,312,163.81 2,729,236.28 2.08x
deepMerge with null values 1,768,072.24 3,133,405.08 1.77x
deepMerge with undefined values 2,718,262.55 8,496,059.94 3.12x
deepMerge with special types (Date, Function) 1,676,593.23 2,698,885.32 1.61x
deepMerge with scalar values 1,349,884.34 2,665,076.88 1.97x
deepMerge with different types at the same key level 2,050,716.76 4,446,150.67 2.17x
deepMerge with nested arrays 1,319,190.54 2,818,486.42 2.14x
changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 06fda8b2e3990feec823eb6bddf9f45e0809a4f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------- | ----- | | svelte-meta-tags | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR