LX4Cnh 1.1.0
dotnet add package LX4Cnh --version 1.1.0
NuGet\Install-Package LX4Cnh -Version 1.1.0
<PackageReference Include="LX4Cnh" Version="1.1.0" />
paket add LX4Cnh --version 1.1.0
#r "nuget: LX4Cnh, 1.1.0"
// Install LX4Cnh as a Cake Addin #addin nuget:?package=LX4Cnh&version=1.1.0 // Install LX4Cnh as a Cake Tool #tool nuget:?package=LX4Cnh&version=1.1.0
Algorithm for high-speed multiplication of LARGE numbers; [0]
Read about LX4Cnh and related: 📑 https://www.reddit.com/r/x3F/comments/ovq368/highspeed_multiplication_of_large_numbers_fast/
Copyright (c) 2021 Denis Kuzmin <x-3F@outlook.com> github/3F
MLnoCS vs LX4Cnh
Algorithm | Maximum bits | One multiplication |
---|---|---|
LX4Cnh | 128+ × 128+ | less than ~ 4.3 ns == 0.0000000043 sec |
MLnoCS | 128+ × 16 (*[1] 32) | less than ~ 0.31 ns == 0.00000000031 sec |
LX4Cnh optimized*[2] | 128+ × 128+ | *[2] less than ~ 0.86 ns == 0.00000000086 sec |
- *[1] - theoretically up to 128 x 32 with some correction.
- *[2] - The actual calculation using LX4Cnh can be a bit optimized such for FNV1a-128 implementation (find it in my repo):
(1 ns == 0.000000001 sec)
Where is this used?
Huid - A high-speed FNV-1a-128 hash-based UUID implementation.
Fnv1a128 - Non-cryptographic hash function. FNV-1a. 「 128-bit 」 implementation.
.NET implementation
128-bit numbers (full range, 128 × 128)
LX4Cnh class provides several ways of setting and getting numbers by using uint, ulong, or bytes array. Just play with available Unit-Tests and Speed-Tests.
For example, using ulong (UInt64)
// 0x4BD4823ECC5D03EB19E07DB8FFD5DABE
// × 0x1D05906000069ABC40A30C07A70906D1
ulong high = LX4Cnh.Multiply
(
0x4BD4823ECC5D03EB, 0x19E07DB8FFD5DABE,
0x1D05906000069ABC, 0x40A30C07A70906D1,
out ulong low
);
// high low
// ________________|_______________
// = 0xACBBE8EAB60C77E249B25D708366091E
LX4Cnh core algorithm: 1.0
LX4Cnh for .NET: 1.1.0.2080+d76d867
Configuration: RCI
Platforms: net40;net472;netcoreapp2.1;net5;netstandard2.0:: generated by a vsSolutionBuildEvent 1.14.1.34071
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.1
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on LX4Cnh:
Repository | Stars |
---|---|
3F/MvsSln
🧩 Customizable VisualStudio .sln parser with project support (.vcxproj, .csproj., …). Pluggable lightweight r/w handlers at runtime, and more …
|
Version | Downloads | Last updated |
---|---|---|
1.1.0 | 2,321 | 7/26/2021 |