this post was submitted on 27 May 2024
134 points (94.1% liked)

Technology

59674 readers
3887 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] muntedcrocodile@lemm.ee 0 points 6 months ago (27 children)

I dont think comparisons should be doing type conversion if i compare a float to an int i want it to say false cos types are different.

[–] jdnewmil@lemmy.ca 5 points 6 months ago (6 children)

Way too late for that. Every language I know makes some kind of auto conversion for numeric comparisons... and sometimes for strings as well.

[–] Ephera@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (5 children)

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 2 points 6 months ago (1 children)

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 5 points 6 months 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.
load more comments (3 replies)
load more comments (3 replies)
load more comments (23 replies)