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 and daily 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

.NET Enumerate List vs. IEnumerable

.NET List Count vs Count()

.NET DateTime vs. DateTimeOffset - UtcNow vs Now

.NET Linq Compiled Expressions

.NET Nullable Value Access (Pattern Matching)

.NET String Create Value Stringbuilder)

.NET Avoid List Allocations)

.NET Struct vs Class- Boxing

.NET Condition vs Exception

.NET SHA512 Create

.NET Linq - Any vs Count

.NET List ConvertAll vs Select-ToList

.NET String Cleanup

.NET List Empty Return

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.

sustainablecode's People

Contributors

benjaminabt avatar

Stargazers

Mehmet avatar Dickson Souza avatar Felix Strauß avatar  avatar Marcus Greiner avatar  avatar Martin Haščák avatar DC avatar Tanguy Pérennou avatar Alperen Kolat avatar Ahmet Kuru avatar Taha Pek avatar Niko avatar Pawel Kasperek avatar ronydev81 avatar Tung Nguyen avatar  avatar Emre Duman avatar  avatar Loader avatar Daniel Richter avatar  avatar  avatar Andi avatar Velotist avatar Danny Pendle avatar Ugur Dal avatar Harr avatar Media Explorer avatar Peter M. Dahlgren avatar darklinden avatar Forbannet avatar Günther Foidl avatar Mushegh Movsisyan S.  avatar Mustafa Salih ASLIM avatar alindnbrg avatar Martin Wagenführ avatar  avatar Ralf Richter avatar  avatar Orhun Çıraklı avatar Philipp Bachmann avatar frankfanslc avatar damienbod avatar  avatar Michael Heinrich avatar Daniel Lindemann avatar David Eggenberger avatar Nils Gutsche avatar Ben Hyrman avatar

Watchers

James Cloos avatar Günther Foidl avatar  avatar  avatar  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.