# ra1028/DifferenceKit

💻 A fast and flexible O(n) difference algorithm framework for Swift collection.

Repository: https://github.com/ra1028/DifferenceKit
Canonical: https://ross.abutalabs.com/products/differencekit
Homepage: https://ra1028.github.io/DifferenceKit
Language: Swift
License: Apache-2.0
License Family: permissive
Topics: diff, difference, changeset, collectionview, tableview, diffing, algorithm, paul-heckel-algorithm
Last push: 2026-06-23T10:13:42+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 89, release rhythm 8, longevity 100
- inputs: {"age_days": 2952, "days_push": 71, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3666, forks 242 (observed 2026-08-28T04:08:13.372881+00:00)

## What it is
DifferenceKit is a Swift framework implementing a fast O(n) diffing algorithm based on Paul Heckel's technique for Swift collections. It computes all kinds of diffs (insertions, deletions, moves, replacements) needed for animated batch updates in list UIs like UITableView and UICollectionView, splitting diffs into stages to avoid crashes.

## Use cases
- animate table view updates when data changes
- diff two arrays in Swift efficiently
- avoid crashes in performBatchUpdates with collection view
- compute changesets for sectioned collections with duplicates
- build reactive list UIs with minimal reloads

## When to choose
- you need linear-time diffing for Swift collections
- you animate batch updates in UIKit, AppKit, or Texture list UIs
- you need a standalone diff engine for a component-driven UI framework

## When to avoid
- you are not developing in Swift or on Apple platforms
- you need text/file diffing rather than collection element diffing
- you want a batteries-included reactive data source library rather than just the algorithm

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: mobile-development, developer-tools, cross-platform
- platform: cross-platform
- tags: diffing, paul-heckel-algorithm, uitableview, uicollectionview, batch-updates, swift-package-manager, cocoapods, algorithm, algorithms, ios, macos, swift

## Member repositories
- ra1028/DifferenceKit (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:13.372881+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:31:32.695934+00:00, confidence not recorded.
  - readme: https://github.com/ra1028/DifferenceKit (fetched 2026-08-28T04:08:13.372881+00:00, sha e3713114a079)
  - homepage: https://ra1028.github.io/DifferenceKit (fetched 2026-08-29T09:25:30.023560+00:00, sha b350413bf1ed)
- Data as of 2026-08-30T08:39:29.467469+00:00.
