# Cysharp/ZLinq

Zero allocation LINQ with LINQ to Span, LINQ to SIMD, and LINQ to Tree (FileSystem, JSON, GameObject, etc.) for all .NET platforms and Unity, Godot.

Repository: https://github.com/Cysharp/ZLinq
Canonical: https://ross.abutalabs.com/products/zlinq
Language: C#
License: MIT
License Family: permissive
Topics: linq, c-sharp, unity
Last push: 2026-07-08T03:27:13+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 78, longevity 100
- inputs: {"age_days": 4331, "days_push": 56, "days_rel": 147, "gap_med": 1.0, "n_releases_24m": 57}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5243, forks 212 (observed 2026-08-28T04:09:13.601314+00:00)

## What it is
ZLinq is a zero-allocation LINQ replacement library for .NET and Unity/Godot, built on struct-based ValueEnumerable to avoid allocations in method chains. It adds LINQ to Span, LINQ to SIMD, and LINQ to Tree (FileSystem, JSON, GameObject) with 99% compatibility with .NET 10's LINQ.

## Use cases
- reduce garbage collection pressure from LINQ chains in C# games
- run LINQ operations on Span<T> without allocations
- use modern .NET 10 LINQ operators in Unity or .NET Framework 4.8
- accelerate LINQ queries with automatic SIMD
- query tree structures like JSON or GameObject hierarchies with LINQ syntax
- drop-in replace standard LINQ for higher performance

## When to choose
- you're building performance-critical .NET or Unity applications where LINQ allocations matter
- you want modern LINQ operators on older targets like netstandard2.0
- you need LINQ over Span<T> or SIMD-accelerated sequences

## When to avoid
- your project targets platforms without struct generics support
- you rely on LINQ features outside ZLinq's 99% compatibility surface
- allocation overhead is irrelevant and you prefer the standard library

## Facets
- artifact type: library
- maturity: active
- function: serialization, developer-tools
- domain: performance, developer-tools
- platform: cross-platform, dotnet, game-engine
- tags: linq, zero-allocation, csharp, simd, span, struct-enumerable, unity, godot, algorithms, game-development

## Member repositories
- Cysharp/ZLinq (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:13.601314+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-29T17:59:36.276166+00:00, confidence not recorded.
  - readme: https://github.com/Cysharp/ZLinq (fetched 2026-08-28T04:09:13.601314+00:00, sha eab4cf4262e3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
