• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 month ago

    I know of Rust, which is pedantic enough to not allow comparing integers to floats directly.

    In certain situations, it even disallows making assumptions about equality and ordering between floats.

    • muntedcrocodile@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      I still cant properly manage my head around the rust object borrowing. My ray tracer implementation from that blog on ray tracing was slow as shiiiit.

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        Not sure, what blog post you’re talking about, but there’s only really three things you can be doing wrong:

        • Tons of cloning.
        • Running your application from a debug build rather than release build.
        • All the usual things one can be doing wrong in any programming language. Like, I imagine real-world raytracing is done on the GPU and uses highly optimized algorithms. I doubt a blog post would dive into those depths. And well, any kind of graphics programming is extremely slow, if you don’t issue the exact right incantations that the GPU manufacturer optimized for.