• aev_software
    link
    fedilink
    arrow-up
    1
    ·
    1 month ago

    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.

    • CaffeinatedCubits
      link
      fedilink
      arrow-up
      1
      ·
      29 days ago

      It does, but it’s based on which type you’re using. Some are Eager and others are lazy.