> For the complete documentation index, see [llms.txt](https://donedeal0.gitbook.io/superdiff/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://donedeal0.gitbook.io/superdiff/competition/benchmark.md).

# Benchmark

{% hint style="success" %}

#### ENVIRONMENT AND METHOD

Node.js 24.12.0 (LTS) • MacBook Pro M2 (2023, Sequoia 15.1) • 16GB RAM.

Warm up runs, then each script is executed 20 times, and we keep the median time. To minimize garbage collection and cross‑benchmark interference, all scenarios are run individually. All benchmark scripts are included so you can reproduce the results locally.
{% endhint %}

***

### LIST DIFF

| Scenario         | Superdiff    | arr-diff   | deep-diff |
| ---------------- | ------------ | ---------- | --------- |
| 10k items array  | **1.84 ms**  | 32.95 ms   | 4.74 ms   |
| 100k items array | **17.43 ms** | 3363.15 ms | 50.36 ms  |

### OBJECT DIFF

| Scenario              | superdiff    | deep-object-diff | deep-diff  | microdiff   |
| --------------------- | ------------ | ---------------- | ---------- | ----------- |
| 10k flat object keys  | 2.27 ms      | 2.44 ms          | 39.37 ms   | **2.24 ms** |
| 100k flat object keys | **29.23 ms** | 31.86 ms         | 3784.50 ms | 29.51 ms    |
| 100k nested nodes     | **4.25 ms**  | 9.67 ms          | 16.51 ms   | 7.26 ms     |

### TEXT DIFF

| Scenario       | superdiff    | diff     |
| -------------- | ------------ | -------- |
| 10k words      | **1.38 ms**  | 3.86 ms  |
| 100k words     | **21.68 ms** | 45.93 ms |
| 10k sentences  | **2.30 ms**  | 5.61 ms  |
| 100k sentences | **21.95 ms** | 62.03 ms |

<sub>(Superdiff uses its</sub> <sub></sub><sub>`normal`</sub> <sub></sub><sub>accuracy settings to match diff's behavior)</sub>

***

{% hint style="info" %}
👉 Despite providing a full structural diff with a richer output, **Superdiff consistently outperforms or matches the fastest diff libraries**. It also scales linearly, even with deeply nested data.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://donedeal0.gitbook.io/superdiff/competition/benchmark.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
