this post was submitted on 03 Nov 2025
6 points (100.0% liked)
C Sharp
1743 readers
8 users here now
A community about the C# programming language
Getting started
Useful resources
- C# documentation
- C# Language Reference
- C# Programming Guide
- C# Coding Conventions
- .NET Framework Reference Source Code
IDEs and code editors
- Visual Studio (Windows/Mac)
- Rider (Windows/Mac/Linux)
- Visual Studio Code (Windows/Mac/Linux)
Tools
Rules
- Rule 1: Follow Lemmy rules
- Rule 2: Be excellent to each other, no hostility towards users for any reason
- Rule 3: No spam of tools/companies/advertisements
Related communities
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not sure whether that is a c# specific challenge. Does c# not know the concept of laziness?
Haskell famously is lazy, and so are Java message streams: memory objects simply don't get created unless you use them.
I can understand that being a problem for trivial benchmarks, but I would assume a benchmarker to have that level of understanding, and otherwise catch up fairly quickly. I also had to learn about laziness when things just didn't want to do anything at all. The compiler just optimized it all away because it wasn't being used, as far as it could tell.
It does, but it's based on which type you're using. Some are Eager and others are lazy.