{"id":25467690,"url":"https://github.com/yn01-dev/burstlinq","last_synced_at":"2025-02-25T08:12:40.798Z","repository":{"id":211555746,"uuid":"729380898","full_name":"yn01-dev/BurstLinq","owner":"yn01-dev","description":" Extremely fast LINQ aggregation operations implementation optimized by Burst Compiler","archived":false,"fork":false,"pushed_at":"2024-03-21T08:08:54.000Z","size":641,"stargazers_count":215,"open_issues_count":1,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T08:12:33.477Z","etag":null,"topics":["burst-compiler","c-sharp","dots","linq","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yn01-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-09T03:54:05.000Z","updated_at":"2025-02-03T23:57:24.000Z","dependencies_parsed_at":"2023-12-13T09:39:26.376Z","dependency_job_id":"f596f69d-5644-405b-9ba1-c73eb4626917","html_url":"https://github.com/yn01-dev/BurstLinq","commit_stats":null,"previous_names":["annulusgames/burstlinq","yn01dev/burstlinq","yn01-dev/burstlinq"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yn01-dev%2FBurstLinq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yn01-dev%2FBurstLinq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yn01-dev%2FBurstLinq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yn01-dev%2FBurstLinq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yn01-dev","download_url":"https://codeload.github.com/yn01-dev/BurstLinq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240627961,"owners_count":19831599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["burst-compiler","c-sharp","dots","linq","unity"],"created_at":"2025-02-18T07:07:57.491Z","updated_at":"2025-02-25T08:12:40.765Z","avatar_url":"https://github.com/yn01-dev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BurstLinq\nExtremely fast LINQ aggregation operations implementation optimized by Burst Compiler\n\n\u003cimg src=\"https://github.com/AnnulusGames/BurstLinq/blob/main/Assets/BurstLinq/Documentation~/img1.png\" width=\"800\"\u003e\n\n[![license](https://img.shields.io/badge/LICENSE-MIT-green.svg)](LICENSE)\n\n[日本語版READMEはこちら](README_JA.md)\n\n## Overview\n\nBurstLinq is a library designed to accelerate LINQ aggregation operations (`Sum`, `Average`, `Min`, etc.) using Unity's Burst Compiler. By integrating BurstLinq, automatically optimized implementations are applied to LINQ methods eligible for Burst, resulting in significantly higher performance compared to regular LINQ.\n\nAdditionally, BurstLinq adds operators like `Sum`, `Min`, etc., to collection types that LINQ cannot usually operate on, such as `NativeArray\u003cT\u003e` or `Span\u003cT\u003e`. It also supports operations like `Sum` and `Average` for Unity-specific types such as `Vector3` and `float3`.\n\n\u003e The concept of BurstLinq is inspired by [Cysharp/SimdLinq](https://github.com/Cysharp/SimdLinq). BurstLinq is a Unity-optimized version that uses Burst instead of .NET's SIMD API.\n\n## Setup\n\n### Requirements\n\n* Unity 2021.3 or later\n* Burst 1.6.0 or later\n\n### Installation\n\n1. Open the Package Manager by going to Window \u003e Package Manager.\n2. Click on the \"+\" button and select \"Add package from git URL\".\n3. Enter the following URL:\n\n```\nhttps://github.com/AnnulusGames/BurstLinq.git?path=/Assets/BurstLinq\n```\n\nAlternatively, open `Packages/manifest.json` and add the following to the `dependencies` block:\n\n```json\n{\n    \"dependencies\": {\n        \"com.annulusgames.burst-linq\": \"https://github.com/AnnulusGames/BurstLinq.git?path=/Assets/BurstLinq\"\n    }\n}\n```\n\n## Quick Start\n\nBurstLinq is designed as a 'Drop-in replacement' similar to SimdLinq, simply including `using BurstLinq;` will automatically apply BurstLinq methods to all operators eligible for Burst.\n\n```cs\nusing System.Collections.Generic;\nusing System.Linq;\nusing BurstLinq;\n\nvar enumerable = Enumerable.Range(0, 100);\nvar array = enumerable.ToArray();\n\n// Enumerable.Sum()\nvar linqSum = enumerable.Sum();\n\n// BurstLinqExtensions.Sum()\nvar burstLinqSum = array.Sum();\n```\n\n## Supported Types and Operators\n\nBelow is the list of operators and types supported by BurstLinq.\n\n### Supported Collection Types\n\n* `T[]`\n* `List\u003cT\u003e`\n* `Memory\u003cT\u003e`\n* `ReadOnlyMemory\u003cT\u003e`\n* `Span\u003cT\u003e`\n* `ReadOnlySpan\u003cT\u003e`\n* `NativeArray\u003cT\u003e`\n* `NativeList\u003cT\u003e`\n* `NativeSlice\u003cT\u003e`\n\n### Supported Operators\n\n* Sum (`int`, `uint`, `long`, `ulong`, `float`, `double`, `Vector2`, `Vector3`, `Vector4`, `int2..4`, `uint2..4`, `float2..4`, `double2..4`)\n* Average (`int`, `uint`, `long`, `ulong`, `float`, `double`, `Vector2`, `Vector3`, `Vector4`, `int2..4`, `uint2..4`, `float2..4`, `double2..4`)\n* Min (`byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`)\n* Max (`byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`)\n* Contains (`byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `Vector2`, `Vector3`, `Vector4`, `int2..4`, `uint2..4`, `float2..4`, `double2..4`)\n* SequenceEqual (`byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `Vector2`, `Vector3`, `Vector4`, `int2..4`, `uint2..4`, `float2..4`, `double2..4`)\n\n## Compatibility with LINQ\n\nBurstLinq may behave differently compared to LINQ as it prioritizes high performance. Be mindful of the following differences when using it.\n\n### Sum/Average\n\nWhile LINQ's Sum is `checked`, BurstLinq is `unchecked`. Burst does not support overflow detection, hence it is set to `unchecked` to avoid behavioral differences when Burst is disabled.\n\n### Handling of Floating-Point Types\n\nBurstLinq's `Sum` specifies `[BurstCompile(FloatMode = FloatMode.Fast)]`, resulting in slight computational discrepancies compared to regular LINQ's `Sum`. While this is rarely an issue, note the lack of compatibility.\n\nAdditionally, BurstLinq does not check for NaN for float/double types, so please take note of this aspect.\n\n## License\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyn01-dev%2Fburstlinq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyn01-dev%2Fburstlinq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyn01-dev%2Fburstlinq/lists"}