NanoVector 1.0.2
dotnet add package NanoVector --version 1.0.2
NuGet\Install-Package NanoVector -Version 1.0.2
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="NanoVector" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NanoVector" Version="1.0.2" />
<PackageReference Include="NanoVector" />
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 NanoVector --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NanoVector, 1.0.2"
#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 NanoVector@1.0.2
#: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=NanoVector&version=1.0.2
#tool nuget:?package=NanoVector&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
![]()
βNanoVectorβ‘
A high-performance, SIMD-accelerated vector library for .NET. Minimalist, zero-allocation, and engineered for raw speed.
β¨ Key Features
- π SIMD Accelerated β Uses hardware intrinsics (AVX/AVX2) to process multiple numbers in a single CPU cycle.
- π Zero Allocations β Engineered to work with
Span<T>andunsafepointers. No Garbage Collector overhead. - π Raw Speed β Bypasses standard .NET bounds checking for maximum throughput.
- π§© Simple API β Easy to use for AI, game engines, and math-heavy applications.
π₯ Installation
Install via NuGet:
dotnet add package NanoVector
π» Usage
π§ Basic Operations
- βΊ Using
using NanoVector; - π Create & Sum β Create a vector from an array and calculate the total sum using SIMD power.
var vector = new MultiVector(new float[] { 1, 2, 3, 4 }); float result = vector.Sum(); - π Sum of Squares β Optimized calculation for AI and statistical variance.
float squares = vector.SumOfSquares(); - π€ AI Comparison β Measure cosine similarity between two vectors for neural networks.
float dotProduct = NanoComparator.DotProduct(vector1, vector2); float similarity = NanoComparator.Compare(vector1, vector2); - π‘οΈ Read-Only Safety β Use
ReadOnlyMultiVectorfor safe data processing without accidental modifications.ReadOnlyMultiVector readOnlyVector = vector.AsReadOnly(); float safeSum = readOnlyVector.Sum(); float safeSumSquares = readOnlyVector.SumOfSquares();
π§ Example: Simple Neuron Calculation
This is a conceptual example of how to implement a high-speed neural network layer using NanoVector:
// Let's represent the input signals and the weight of the neuron
// Input signals and trained weights
var inputs = new MultiVector(new float[] { 0.5f, -0.2f, 0.8f, 0.1f });
var weights = new MultiVector(new float[] { 0.15f, 0.45f, -0.1f, 0.9f });
float bias = 0.05f;
// 1. Compute the dot product using SIMD
// Calculate dot product with hardware acceleration
float dot = NanoComparator.DotProduct(inputs, weights);
// 2. Add bias and apply activation (ReLU)
// Add bias and apply ReLU activation
float neuronOutput = MathF.Max(0, dot + bias);
//Showing the result
Console.WriteLine($"Neuron result: {neuronOutput}");
β Support NanoVector β‘
If this library saved your nanoseconds, consider a tip:
| ETH / EVM | Bitcoin | Litecoin |
|---|---|---|
![]() |
![]() |
![]() |
0xCCDD9...4AB4 |
bc1qjmw...uhcd |
LgSVCqN...VP3o |
- ETH / Polygon / BSC / Base (EVM):
0xCCDD90984C6e9BC4a84e10c402CF85e69f9A4AB4 - Bitcoin (BTC):
bc1qjmwjjcqnphrc3qmy6x9pl5qk06a28msdw8uhcd - Litecoin (LTC):
LgSVCqNyt44Rgg7jPTkbiKzskedy5AVP3o
π‘οΈ License
Distributed under the MIT License. See LICENSE for more information.
Built for nanoseconds. π§¬
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.


