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

IDEs and code editors

Tools

Rules

Related communities

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] aev_software@programming.dev 1 points 2 weeks ago (1 children)

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.