• 0 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: July 31st, 2023

help-circle

  • Recursion makes it cheaper to run in the dev’s mind, but more expensive to run on the computer.

    Maybe for a Haskell programmer, divide-and-conquer algorithms, or walking trees. But for everything else, I’m skeptical of it being easier to understand than a stack data structure and a loop.


  • pivot_root@lemmy.worldtoProgrammer Humor@lemmy.mlStop
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    In a single one-off program or something that’s already fast enough to not take more than a few seconds—yeah, the time is spent better elsewhere.

    I did mention for a compiler, specifically, though. They’re CPU bottlenecked with a huge number of people or CI build agents waiting for it to run, which makes it a good candidate for squeezing extra performance out in places where it doesn’t impact maintainability. 0.02% here, 0.15% there, etc etc, and even a 1% total improvement is still a couple extra seconds of not sitting around and waiting per Jenkins build.

    Also keep in mind that adding features or making large changes to a compiler is likely bottlenecked by bureaucracy and committee, so there’s not much else to do.


  • Not necessarily. It depends on what you’re optimizing, the impact of the optimizations, the code complexity tradeoffs, and what your goal is.

    Optimizing many tiny pieces of a compiler by 0.02% each? It adds up.

    Optimizing a function called in an O(n2) algorithm by 0.02%? That will be a lot more beneficial than optimizing a function called only once.

    Optimizing some high-level function by dropping into hand-written assembly? No. Just no.







  • To offer a differing opinion, why is null helpful at all?

    If you have data that may be empty, it’s better to explicitly represent that possibility with an Optional<T> generic type. This makes the API more clear, and if implicit null isn’t allowed by the language, prevents someone from passing null where a value is expected.

    Or if it’s uninitialized, the data can be stored as Partial<T>, where all the fields are Optional<U>. If the type system was nominal, it would ensure that the uninitialized or partially-initialized type can’t be accidentally used where T is expected since Partial<T> != T. When the object is finally ready, have a function to convert it from Partial<T> into T.








  • This fork doesn’t even have the code for the dynarmic submodule under the externals/dynarmic directory. MerryMage/MerryHime took that down with Yuzu, and it’s a core part of the JIT recompiler.

    Not to mention, the commit history was wiped clean while a new Patreon was created before even touching a line of C++ code (and subsequently realizing it’s missing most of the dependencies).




  • The system is absolutely bullshit. If this makes it into a courtroom, the odds will likely be even further stacked against Yuzu. The chance of getting a judge that goes out of his/her way to understand the technical arguments is extremely low, and it’s a lot easier to argue that unauthorized decryption is bypassing something than it is to argue that software needing to do it to work isn’t primarily designed to do it.

    Unless the EFF steps in and bankrolls Yuzu, the most realistic case here is that they settle out of court and Nintendo gets exactly what they want.