Giter Site home page Giter Site logo

experiments's Introduction

experiments

Async Processing Benchmarks

Create a ravendb database on a sevrer with high latency from you, such as in the AWS when running the benchmark from your computer.

Add database information to appsettings.json or create an appsettings.local.json

Seed database with Sample data. This is available in the UI with RavenDB 4

Compile the project for Release, and run.

Blog post explaining what this is about: https://scatteredcode.net/parallel-foreach-async-in-c/

Results using 913 base records

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363 AMD Ryzen Threadripper 2950X, 1 CPU, 32 logical and 16 physical cores .NET Core SDK=3.1.100 [Host] : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT DefaultJob : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT

Method Mean Error StdDev Ratio RatioSD
Linear 22.599 s 0.4394 s 0.5866 s 1.00 0.00
ForEachAsync 2.499 s 0.0491 s 0.0947 s 0.11 0.00
ParallelForEachAsync 2.485 s 0.0604 s 0.0565 s 0.11 0.00
AsyncParallelForEach 2.157 s 0.0423 s 0.0578 s 0.10 0.00
AsyncEnumerableParallelForEach 2.130 s 0.0425 s 0.0522 s 0.09 0.00

Results using 9130 base records

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363 AMD Ryzen Threadripper 2950X, 1 CPU, 32 logical and 16 physical cores .NET Core SDK=3.1.100 [Host] : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT Job-WEHRKA : .NET Core 3.1.0 (CoreCLR 4.700.19.56402, CoreFX 4.700.19.56404), X64 RyuJIT

InvocationCount=1 UnrollFactor=1

Method Mean Error StdDev Ratio RatioSD
Linear 244.07 s 5.703 s 8.879 s 1.00 0.00
ForEachAsync 30.84 s 1.899 s 5.324 s 0.11 0.01
AsyncForEach 272.10 s 5.435 s 8.620 s 1.12 0.05
ParallelForEachAsync 26.53 s 0.339 s 0.317 s 0.11 0.00
AsyncParallelForEach 25.79 s 0.490 s 0.564 s 0.10 0.00
AsyncEnumerableParallelForEach 24.67 s 0.436 s 0.408 s 0.10 0.00

experiments's People

Contributors

scattered-code avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.