Skip to content

Commit

Permalink
Merge pull request #13 from kzrnm/release/v2.0.0
Browse files Browse the repository at this point in the history
Release v2.0.0
  • Loading branch information
kzrnm authored Nov 13, 2021
2 parents ada8a92 + 1189f13 commit 1a3e445
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 37 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK 6.0
- name: Setup .NET SDK .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
Expand All @@ -77,10 +77,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET SDK .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.nuget/packages
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK 6.0
- name: Setup .NET SDK .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
Expand All @@ -31,10 +31,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET SDK .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.nuget/packages
Expand Down
12 changes: 7 additions & 5 deletions Base32768.Benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,27 @@ public BenchmarkConfig()
AddDiagnoser(MemoryDiagnoser.Default);
AddExporter(BenchmarkDotNet.Exporters.MarkdownExporter.GitHub);
AddJob(Job.ShortRun.WithToolchain(CsProjCoreToolchain.NetCoreApp60));
AddJob(Job.ShortRun.WithToolchain(CsProjCoreToolchain.NetCoreApp50));
AddJob(Job.ShortRun.WithToolchain(CsProjClassicNetToolchain.Net472));
}
}

[Config(typeof(BenchmarkConfig))]
[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory, BenchmarkLogicalGroupRule.ByMethod)]
[GroupBenchmarksBy(
BenchmarkLogicalGroupRule.ByJob,
BenchmarkLogicalGroupRule.ByCategory,
BenchmarkLogicalGroupRule.ByMethod)]
public class Base32768Benchmark
{
[Params(1000, 100000)]
public int N;
[Params(1_00_000, 10_000_000)]
public int ByteSize;

public byte[] bytes;
public string str;

[GlobalSetup]
public void Setup()
{
bytes = new byte[N];
bytes = new byte[ByteSize];
new Random(42).NextBytes(bytes);

str = Base32768.Encode(bytes);
Expand Down
2 changes: 1 addition & 1 deletion Base32768.Test/Base32768.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;net46;net472;net5.0</TargetFrameworks>
<TargetFrameworks>net452;net46;net472;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<RootNamespace>Kzrnm.Convert.Base32768</RootNamespace>
Expand Down
6 changes: 2 additions & 4 deletions Base32768/Base32768.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<RepositoryUrl>https://github.com/kzrnm/Base32768</RepositoryUrl>
<PackageReleaseNotes>https://github.com/kzrnm/Base32768/blob/master/CHANGELOG.md</PackageReleaseNotes>

<Version>1.0.10</Version>
<Version>2.0.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
Expand All @@ -41,9 +41,7 @@
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Base32768.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001006dbc290b4b57d661d222964b61c801e8363a0096788ce15e03988aa0a6e7455b61c8eccd0870dbbc53e446d84e41ec52ed5ed5f18f1d910dfb66f89b5eff8fd50d610309e237bde39b8bc562cf8fdb48ec9d5dda870616918fa861c3f96f8cf0a82b14fe63439c969f3a7929f814209f473d006cb81fb21d54e21a14376e9ddd</_Parameter1>
</AssemblyAttribute>
<InternalsVisibleTo Include="Base32768.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001006dbc290b4b57d661d222964b61c801e8363a0096788ce15e03988aa0a6e7455b61c8eccd0870dbbc53e446d84e41ec52ed5ed5f18f1d910dfb66f89b5eff8fd50d610309e237bde39b8bc562cf8fdb48ec9d5dda870616918fa861c3f96f8cf0a82b14fe63439c969f3a7929f814209f473d006cb81fb21d54e21a14376e9ddd" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - Unreleased
## [2.0.0] - 2021-11-13
### Add
- Stream API
- Support .NET Framework 3.5
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,28 @@ Console.WriteLine(string.Join(", ", byteArray2));
```

## Benchmark

``` ini

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1348 (21H1/May2021Update)
Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.101
[Host] : .NET Core 5.0.1 (CoreCLR 5.0.120.57516, CoreFX 5.0.120.57516), X64 RyuJIT
ShortRun : .NET Core 5.0.1 (CoreCLR 5.0.120.57516, CoreFX 5.0.120.57516), X64 RyuJIT
.NET SDK=6.0.100
[Host] : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
ShortRun : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT

Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3

```
| Method | Toolchain | N | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |-------------- |------- |-----------:|-----------:|----------:|--------:|--------:|--------:|----------:|
| **Encode** | **.NET Core 5.0** | **1000** | **2.093 μs** | **0.7857 μs** | **0.0431 μs** | **0.5341** | **-** | **-** | **2.19 KB** |
| Encode | net472 | 1000 | 2.512 μs | 0.4415 μs | 0.0242 μs | 0.5608 | - | - | 2.31 KB |
| **Encode** | **.NET Core 5.0** | **100000** | **201.801 μs** | **5.6550 μs** | **0.3100 μs** | **66.6504** | **66.6504** | **66.6504** | **208.44 KB** |
| Encode | net472 | 100000 | 243.293 μs | 35.6847 μs | 1.9560 μs | 66.6504 | 66.6504 | 66.6504 | 208.93 KB |
| | | | | | | | | | |
| **Decode** | **.NET Core 5.0** | **1000** | **1.675 μs** | **0.2148 μs** | **0.0118 μs** | **0.2441** | **-** | **-** | **1 KB** |
| Decode | net472 | 1000 | 1.804 μs | 0.5857 μs | 0.0321 μs | 0.2441 | - | - | 1 KB |
| **Decode** | **.NET Core 5.0** | **100000** | **171.527 μs** | **31.7089 μs** | **1.7381 μs** | **31.0059** | **31.0059** | **31.0059** | **97.68 KB** |
| Decode | net472 | 100000 | 184.791 μs | 16.9163 μs | 0.9272 μs | 31.0059 | 31.0059 | 31.0059 | 97.68 KB |
| Method | Toolchain | ByteSize | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |--------------------- |--------- |------------:|-------------:|------------:|---------:|---------:|---------:|----------:|
| **Encode** | **.NET 6.0** | **100000** | **182.3 μs** | **80.15 μs** | **4.39 μs** | **66.6504** | **66.6504** | **66.6504** | **209 KB** |
| **Encode** | **.NET 6.0** | **10000000** | **22,883.3 μs** | **8,175.44 μs** | **448.12 μs** | **187.5000** | **187.5000** | **187.5000** | **20,834 KB** |
| | | | | | | | | | |
| **Decode** | **.NET 6.0** | **100000** | **153.7 μs** | **6.30 μs** | **0.35 μs** | **31.0059** | **31.0059** | **31.0059** | **98 KB** |
| **Decode** | **.NET 6.0** | **10000000** | **17,476.8 μs** | **3,930.23 μs** | **215.43 μs** | **156.2500** | **156.2500** | **156.2500** | **9,766 KB** |
| | | | | | | | | | |
| **Encode** | **.NET Framework 4.7.2** | **100000** | **218.4 μs** | **40.80 μs** | **2.24 μs** | **66.6504** | **66.6504** | **66.6504** | **209 KB** |
| **Encode** | **.NET Framework 4.7.2** | **10000000** | **27,941.3 μs** | **26,456.85 μs** | **1,450.19 μs** | **187.5000** | **187.5000** | **187.5000** | **20,835 KB** |
| | | | | | | | | | |
| **Decode** | **.NET Framework 4.7.2** | **100000** | **183.3 μs** | **169.63 μs** | **9.30 μs** | **31.0059** | **31.0059** | **31.0059** | **98 KB** |
| **Decode** | **.NET Framework 4.7.2** | **10000000** | **18,493.5 μs** | **5,774.40 μs** | **316.51 μs** | **125.0000** | **125.0000** | **125.0000** | **9,766 KB** |

0 comments on commit 1a3e445

Please sign in to comment.