From c6ddb8410210b4f8831c837db86b055a014aa883 Mon Sep 17 00:00:00 2001 From: DoneDeal0 Date: Tue, 27 Dec 2022 17:16:59 +0100 Subject: [PATCH] feat: add benchmark --- README.md | 9 +++++++-- package.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fd2d773..34aa32c 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,14 @@ This library compares two arrays or objects and return a complete diff of their ## WHY YOU SHOULD USE THIS LIB -All other existing solutions return a weird diff format which often require an additionnal parsing. They are also limited to object comparison. 👎 +All other existing solutions return a weird diff format which often require an additional parsing. They are also slow and limited to object comparison. 👎 -**Superdiff** gives you a complete diff for both array and objects with a very readable format. Last but not least, it's battled tested. Import. Enjoy. 👍 +**Superdiff** gives you a complete diff for both array and objects with a very readable format. Last but not least, it's battled tested and super fast. Import. Enjoy. 👍 + +Benchmark for 10k objects: + +- **Superdiff**: 256 ops/sec ⚡ +- **Deep-diff**: 35.98 ops/sec 🐢 ## DIFF FORMAT COMPARISON diff --git a/package.json b/package.json index a75190b..b884622 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@donedeal0/superdiff", - "version": "1.0.2", + "version": "1.0.3", "description": "SuperDiff checks the changes between two objects or arrays. It returns a complete diff with relevant information for each property or piece of data", "main": "dist/index.js", "module": "dist/index.js",