gens

joined 2 years ago
[–] gens@programming.dev 13 points 4 days ago

Is this a meme ?

[–] gens@programming.dev 3 points 5 days ago

Imagine there's like a super rich country where everybody gets paid at least 10x what you do. And they order crap from the company you work at.

It's just the way it is in the world. A new gpu costs the same in my country, but median pay is like 2-4x less. So basically imagine if a new gpu costs 3000$ instead of 1k. Obligatory nvidia f you.

[–] gens@programming.dev 45 points 5 days ago (37 children)

I just blocked the whole instance as soon as the option was implemented. There were few good posts/comunities from it, but overall better to block it whole.

[–] gens@programming.dev 9 points 5 days ago

I always say kthxbye. They are training off the responses, so I do it for the small chance that it will respond like that to someone ending a conversation.

[–] gens@programming.dev 4 points 1 week ago* (last edited 1 week ago)

Lineageos. I'm like 1 android version behind latest on s9.

Also it depends on the chip maker and the phone maker. Fairphone will get the latest for like a decade..

[–] gens@programming.dev 3 points 2 weeks ago* (last edited 2 weeks ago)

Ofc it's wrong. You can be peaceful and harmless.

Musk is a moron.

Edit: The more I think about it, the wrong-er/stupider it gets.

[–] gens@programming.dev 6 points 2 weeks ago (1 children)

European trains varie from "very good" to "a guy wearing a full snail costume outran a train". True story that one, happened in hungary.

[–] gens@programming.dev 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Look, I wrote plenty of assembly. A human knows how the code will flow. A compiler knows how everything is linked together, but it does not know how exactly the code will flow. In higher level languages, like C, we don't always think about things like what branch is more likely (often many times more likely).

Memory is the real performance winner, and yes registers play a big role in that. While cache is more important it depends on data layout and how it is processed. That is practically the same in C and asm.

C compilers don't even use every GP register on amd64. And you know exactly what you need when you go into some procedure. And when you get called / call outside of your.. object file in C (or C ABI), you have to: "Functions preserve the registers rbx, rsp, rbp, r12, r13, r14, and r15; while rax, rdi, rsi, rdx, rcx, r8, r9, r10, r11 are scratch registers." put those on the stack. So libraries have calling overhead (granted there is LTO). In assembly you can even use the SSE registers as your scratchpad, pulling and putting arbitrary data in them (even pointers). The compilers never do that. (SSE registers can hold much more then GP)

In asm you have to know exactly how memory is handled, while C is a bit abstracted.

If you want to propagate such claims, read the "Hellо, I am a compiler" poorly informed.. poem ? But it's easy to see how much a compiler doesn't optimize by comparing compilers and compiler flags. GCC vs LLVM, O3 vs Os and even O2. What performs best is random, LLVM Os could be the fastest depending on the program. Differences are over 10% sometimes.

Biggest problem with writing in asm is that you have to plan a lot. It's annoying, so that's why I write higher level languages now.

Edit: Oh, I didn't talk about instructions not in C, nor the FLAGS register.

[–] gens@programming.dev 0 points 3 weeks ago (4 children)

Compilers have a lot of chalenges to even compile, let alone optimize. Just register allocation alone is a big problem. An inherent problem is that the compiler does not know what the program is supposed to do. Humans still write better assembly then compilers.

The one down arrow on the guy you are responding to is from me, just so everybody knows.

view more: next ›