• 2 Posts
  • 93 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle



  • I shouldn’t have used C++ as the example. Even C would work. I agree with everything you’re saying, but the original premise. I think if you put ASM vs C, C++, rust, etc, performance would fall near 50/50.

    I’m not the best assembly guy, and I’m not advocating we all write it. But I always felt that the compiler optimization assumption was wrong or weak. Everything would be aligned nicely for my sanity, not performance =]


  • jas0n@lemmy.worldtoRetroGaming@lemmy.worldHow hard could it be?
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    18 days ago

    I feel like that’s only true if I was asked to “write the assembly for this c++ program.” If I’m actually implementing something big in assembly, I’m not going to do 90% of the craziness someone might be tempted to do in c++. Something that is super easy in c++ doesn’t mean it’s easy for the CPU. Writing assembly, I’m going to do what’s easy for the CPU (and efficient) because, now, I’m in the same domain.

    The bottom line is cranking up the optimization level can get you a 2-5x win. Using memory efficiently can give you a 10-100x win.










  • And the flip side of that; paying a craftsman to do the job is 1000% better for everyone involved!

    Better for the craftsman. I’m helping someone else stay employed.

    Better for my house/car. Let’s be honest, I learn by trial and error.

    Better for me. Outside of more basic maintenance, I don’t want to buy all those specialty tools… like that thing you use to pull a shower handle cartridge out.

    It’s better for the economy. Putting money in the craftsman’s pocket contributes to the general churn of the economy, and he is more inclined to buy local where I am more likely to end up at a franchise. It’s a little thing I call Trickle Up Economics™.


  • Ha, my boss gives me this one. “But I’m different,” he says when I tell him about side project stuff like working on my house. I try to tell him… everyone my age I know is like that. They fix their own car/house/electronics and also do some kind of side work. You know how much a contractor costs? Between friends and family, I could be a contractor tomorrow, but not because I want to be. It’s out of necessity. I would love to pay someone else to install floors or do plumbing.

    But yeah… all the evidence in front of his face doesn’t hold a candle to whatever Fox News tells him.