How can I write carbon effiecient c# code without compromising on perfromance?

meghana chitta 1 Reputation point

I am wondering if there are any examples as to learn how to incorporate sustainable software development. I am a .NET developer and looking for resources that guide me on how I can develop applications using .NET core / C# that are carbon efficient and contribute to climate change.

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,377 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Karen Payne MVP 35,201 Reputation points

    There are several things to consider for efficient code

    • The developer's knowledge, with limited knowledge one can not know what to look for and there is no tried and true pattern that works for every application in regards to code.
    • What type of project, the environment and hardware.
    • Knowing the cost of using any framework homebrewed or third party
    • Using libraries such as Benchmarkdotnet to bench mark code
    • Load testing which we do on all web applications that are outfacing to the entire state of Oregon
    • Measure app performance in Visual Studio

    And one must not just started coding with only a vision, write out your requirements, work in iterations and with each task in a iteration check performance along with writing unit test.

    Something I do is not always look for one-liners or libraries that promise this and that without knowing what their footprint is.

    0 comments No comments