ZiggyMath 3.0.0

dotnet add package ZiggyMath --version 3.0.0
                    
NuGet\Install-Package ZiggyMath -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZiggyMath" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZiggyMath" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZiggyMath" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZiggyMath --version 3.0.0
                    
#r "nuget: ZiggyMath, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZiggyMath@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZiggyMath&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZiggyMath&version=3.0.0
                    
Install as a Cake Tool

ZiggyMath

High-performance mathematics library with SIMD acceleration and zero GC pressure.

Quick Start

using ZiggyMath;
using ZiggyMath.Core;

// Create vectors
using var v1 = new Vector(1000);
using var v2 = new Vector(1000);

// Initialize and compute
for (int i = 0; i < 1000; i++)
{
    v1[i] = Math.Sin(i * 0.01);
    v2[i] = Math.Cos(i * 0.01);
}

double dotProduct = v1.DotProduct(v2);

// Matrix operations
using var matrix = new Matrix(100, 100);
using var result = Matrix.Multiply(matrix, matrix.Transpose());

Performance

ZiggyMath delivers significant performance improvements:

  • 5-29x faster memory operations through SIMD
  • Zero GC pressure for real-time applications
  • Hardware acceleration with AVX2 support
  • Optimized memory access patterns for cache efficiency

Requirements

  • .NET 8.0 or later
  • x64 or ARM64 processor
  • Unsafe code enabled (configured automatically)

Installation

dotnet add package ZiggyMath

Or add to your .csproj:

<PackageReference Include="ZiggyMath" Version="1.0.0" />

Dependency Injection Setup

public void ConfigureServices(IServiceCollection services)
{
    // Register default allocator
    services.AddSingleton<IUnmanagedMemoryAllocator>(ZiggyMath.DefaultAllocator);

    // Or use custom allocator for specific workloads
    services.AddSingleton<IUnmanagedMemoryAllocator>(provider =>
        new HybridAllocator(new SystemMemoryAllocator()));
}

Configuration Options

public static class MathConfiguration
{
    public static IUnmanagedMemoryAllocator GetAllocatorForWorkload(MathWorkload workload)
    {
        return workload switch
        {
            MathWorkload.LinearAlgebra => new SlabAllocator(new SystemMemoryAllocator()),
            MathWorkload.SignalProcessing => new LargeBlockAllocator(new SystemMemoryAllocator()),
            MathWorkload.SmallComputations => new UnmanagedMemoryPool(new SystemMemoryAllocator()),
            _ => ZiggyMath.DefaultAllocator
        };
    }
}

public enum MathWorkload
{
    LinearAlgebra,
    SignalProcessing,
    SmallComputations,
    GeneralPurpose
}

Acknowledgments

ZiggyMath is built on top of ZiggyAlloc, a high-performance memory management library that provides the foundation for ZiggyMath's zero-GC pressure design and advanced allocation strategies.

Documentation

For detailed API documentation, see the docs directory.

License

MIT License - see LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 32 9/30/2025

Version 3.0.0 - Advanced Mathematical Features
     - Optimized linear algebra with ZiggyAlloc performance
     - Enhanced FFT implementation with hardware acceleration
     - Advanced numerical integration (adaptive quadrature, Monte Carlo)
     - High-performance statistical operations
     - 5-15x performance improvement over standard implementations