Sharkbench

Benchmarking programming languages and web frameworks

C# Computation Benchmark

About C#

Paradigm

Object-Oriented, Imperative, Event-Driven, Functional

Execution

JIT

Typing

Static

Null Safety

YES

Memory Management

Garbage Collection

C# is a modern, general-purpose programming language developed by Microsoft as part of its .NET initiative. Known for its simplicity, power, and versatility, C# is designed to be used for developing software components suitable for deployment in distributed environments. It is primarily used on the .NET Framework for Windows application development but has grown to support cross-platform needs via .NET Core. C#'s integration with Windows and its comprehensive set of libraries make it a prime choice for developing desktop applications, web services, and enterprise software.

Benchmarks

This benchmark tests how fast a programming language can perform mathematical computations without any I/O or memory allocation. We are using the Leibniz formula to approximate the value of PI.
Please note that the memory usage also includes the memory used by the HTTP server. Ideally, the most lightweight HTTP server should be used to measure the raw memory usage of the runtime.
Language
Time
Memory
C# (.NET v8.0)
2.53 s
9.7 MB
C# (.NET v6.0)
2.56 s
8.6 MB

© 2024 Tien Do Nam