Skip to content

Instantly share code, notes, and snippets.

View dmitry-ra's full-sized avatar
🌐

Dmitry Razumikhin dmitry-ra

🌐
View GitHub Profile
namespace Base64Benchmarks
{
public class Base64EncodeBenchmarks
{
private const int N = 20 * 1024 * 1024;
private readonly byte[] _data;
public Base64EncodeBenchmarks()
{
_data = new byte[N];
// Validating benchmarks:
// ***** BenchmarkRunner: Start *****
// ***** Found 6 benchmark(s) in total *****
// ***** Building 1 exe(s) in Parallel: Start *****
// start dotnet restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 in C:\dev\benchmarks\comparative\Base32Encoding\Base32Benchmarks\bin\Release\net5.0\a48ffabe-b44d-4206-a833-2aeb7f0f6330
// command took 2,02s and exited with 0
// start dotnet build -c Release --no-restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 in C:\dev\benchmarks\comparative\Base32Encoding\Base32Benchmarks\bin\Release\net5.0\a48ffabe-b44d-4206-a833-2aeb7f0f6330
// command took 3,31s and exited with 0
// ***** Done, took 00:00:05 (5.46 sec) *****
// Found 6 benchmarks:
using System;
using BenchmarkDotNet.Attributes;
namespace Base32Benchmarks
{
// <ItemGroup>
// <PackageReference Include = "Albireo.Base32" Version="1.2.0" />
// <PackageReference Include = "BenchmarkDotNet" Version="0.12.1" />
// <PackageReference Include = "deniszykov.BaseN" Version="3.0.0" />
// <PackageReference Include = "SimpleBase" Version="3.0.2" />
using System;
using BenchmarkDotNet.Attributes;
namespace Base32Benchmarks
{
// <ItemGroup>
// <PackageReference Include = "Albireo.Base32" Version="1.2.0" />
// <PackageReference Include = "BenchmarkDotNet" Version="0.12.1" />
// <PackageReference Include = "deniszykov.BaseN" Version="3.0.0" />
// <PackageReference Include = "SimpleBase" Version="3.0.2" />
@dmitry-ra
dmitry-ra / NAudioBugTest.cs
Created November 10, 2015 22:50
NAudio CircularBuffer test
using System;
using System.Threading.Tasks;
using NAudio.Utils;
namespace NAudioBugTest
{
class Program
{
static CircularBuffer _testBuffer;
static long _added, _skipped, _count;