Giter Club home page Giter Club logo

dotnet-collections-benchmark's Introduction

.NET Collections Benchmark

.NET Collections Benchmark

A comprehensive performance comparison benchmark between different .NET collections.

If you are working with small collections (e.g. 100 items) or your code is not HOT path (not executed frequently), it's not a big deal and you usually don't need to worry about your collection's performance. (It's better not to waste your time with premature micro-optimizations)

However, if you are dealing with Large collections (e.g. 100K, 1M, or more items) or your code is HOT path (executed frequently), you should be obsessed with performance and choosing the best collection type based on your needs and conditions.

This benchmark report helps you to choose the best collection type in terms of performance based on your needs and conditions.

Give it a Star! ⭐️

If you find this repository useful and like it, why not give it a star? if not, never mind! :)

Benchmarks

Benchmark of Collection Searching (Contains method) in terms of Execution Time (Mean)

Benchmark-SearchContains-Mean-Preview

Benchmark of Collection Searching (Contains method) in terms of Allocation Size

Benchmark-SearchContains-Allocated-Preview

Benchmark of Collection Initializing in terms of Execution Time (Mean)

Benchmark-Initialize-Mean-Preview

Benchmark of Collection Initializing in terms of Allocation Size

Benchmark-Initialize-Allocated-Preview

Benchmark of Collection Searching (TryGetValue method) in terms of Execution Time (Mean)

Benchmark-SearchTryGetValue-Mean-Preview

Benchmark of Collection Searching (TryGetValue method) in terms of Allocation Size

Benchmark-SearchTryGetValue-Allocated-Preview

BenchmarkDotNetVisualizer🌈

All the benchmarks are visualized using BenchmarkDotNetVisualizer.

Todo

  • Add benchmarks for other operations such as Add, Insert, Remove, and Update.

Useful Resources

dotnet-collections-benchmark's People

Contributors

mjebrahimi avatar dependabot[bot] 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.