Giter Club home page Giter Club logo

sustainablecode's Introduction

๐ŸŒณ Sustainable Code - by BEN ABT

Sustainable applications are becoming increasingly important, because more and more energy consumption is attributable to the operations of a platform or application.

On the user side, this can be seen in the battery life of a laptop or cell phone and as a platform operator, it can be seen in the costs of compute power.

In this repository I use well-known snippets and compare them to sustainable implementations.

It's worth it!

.NET Samples

Code samples and snippets based on .NET

.NET Object Pooling with StringBuilder

.NET Less Allocations with Hyperlinq

.NET Low Allocation Log Message Generation

.NET String Generation

.NET Struct vs Class

.NET Local method hot path

.NET C# 10 String Interpolation

.NET List vs HashSet

.NET In Modifier

.NET Create Empty Collection

.NET String ToUpper vs. ToLower

Energy Calculation

The energy consumption of an application itself is comparatively complex to measure and often inaccurate. Therefore, proxy measurements are mostly used: the better an application performs, the less energy is required.

The combination of the performance of the code and the energy consumption of the hardware then results in the CO2 footprint, for example.

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.