StructureOfArraysGenerator - Generating Cache and SIMD Friendly Data Structures for High-Performance Code in .NET and Unity

2023-01-26

StructureOfArraysGenerator is a source generator that generates structure of arrays (SoA) data structure in .NET and Unity. The standard C# array is an array of structures (AoS), whereas the SoA is more suitable for utilizing the CPU cache and for ultra-fast parallel processing by SIMD. MultiArray is x2 faster and SIMD version (SoA is easy to write SIMD) is x10 faster. The generated code minimizes memory and heap usage in C#. The package provides only analyzer and the generated code does not depend on any other libraries. To use it, make a readonly partial struct type with [MultiArray] attribute. The package is distributed via NuGet. For Unity, the requirements and installation process are completely different. See the documentation for details.

Link [ https://github.com/Cysharp/StructureOfArraysGenerator ]

Previous Article

StructureOfArraysGenerator - Generating Cache and SIMD Friendly Data Structures for High-Performance Code in .NET and Unity

2023-01-26

StructureOfArraysGenerator is a source generator that generates structure of arrays (SoA) data structure in .NET and Unity. The standard C# array is an array of structures (AoS), whereas the SoA is more suitable for utilizing the CPU cache and for ultra-fast parallel processing by SIMD. MultiArray is x2 faster and SIMD version (SoA is easy to write SIMD) is x10 faster. The generated code minimizes memory and heap usage in C#. The package provides only analyzer and the generated code does not depend on any other libraries. To use it, make a readonly partial struct type with [MultiArray] attribute. The package is distributed via NuGet. For Unity, the requirements and installation process are completely different. See the documentation for details.

Link [ https://github.com/Cysharp/StructureOfArraysGenerator ]

Copyright © 2024 All rights reserved

Rss

Atom