• pixxelkick@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    43
    ·
    edit-2
    1 year ago

    ITT: non devs that think multithreading is still difficult.

    It’s become so trivial in many frameworks/languages nowadays, its starting to actually shifting towards single threading being something you have to do intentionally.

    Everything is async by default first class and you have to go out of your way to unparallelize it.

    It’s being awhile since I have seen anything mainstream that seriously cared about single thread performance enough to make it the most important benchmark.

    I care about TDP way more. Your single thread performance doesn’t mean shit if your cpu starts to thermal throttle.

    • qqq@lemmy.world
      link
      fedilink
      English
      arrow-up
      41
      ·
      edit-2
      1 year ago

      Async features in almost all popular languages are a single thread running an event loop (Go being an exception there I believe). Multi threading is still quite difficult to get right if the task isn’t trivially parallelizable.

    • throwwyacc@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      I’m a software engineer. And yes multithreading is difficult, just slapping on async isn’t necessarily going to help you run code in parallel

      Think about the workload a game is using, you have to do most calcs on a frame by frame basis and you tend to want effects to apply in order. So you have a hard time running in parallel as the state for frame 1 needs to be calculated before frame 2. And within frame 1 any number of scripts can rely on the results of another, so you can’t just throw threads at the problem You can do some things like the sound system but beyond that it’s not trivial