• 2 Posts
  • 330 Comments
Joined 2 years ago
cake
Cake day: August 4th, 2023

help-circle


  • genstoProgrammer HumorWhy indeed
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    Yea, textures are the biggest thing (unless there’s video). But don’t underestimate vertices, even when using strips. Unity, i think, just ships textures as BCn, meaning 1MB per 1k texture (would be 3-4MB raw). It’s even better for the gpu then raw. Then there’s normal maps, etc.

    Another thing is lighting data, be it some textures, probes, or whatever. That can also take up plenty of space.


  • genstoProgrammer HumorWhy indeed
    link
    fedilink
    arrow-up
    14
    ·
    2 days ago

    Less triangles and smaller textures. Crt monitors had less resolution and practically built-in anti-aliasing so they could get away with (and had to) “worse” assets.

    Also since ssd-s have become mainstream unity uses less compression so it would load relatively faster.

    Basically because monitors got better, standards got higher, competition got fiercer, storage got bigger and faster, etc.

    And it’s not like there weren’t shitty games before, just everybody forgot about them.

    I like how the game Banished is made. From a requirenments/looks ratio it is IMO great. One guy made it. Ghosts of Tsushima also looks amazing and is great from a techical perspective, but it is heavy.




  • 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.


  • genstoLinux@lemmy.worldUbuntu Will Replace GNU Core Utilities With Rust
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    9 days ago

    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.





  • genstoLocalLLaMA@sh.itjust.worksModels not loading into RAM
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    30 days ago

    The programs usually mmap the file into memory. That means that parts of it are loaded as used and unloaded if there is no memory left. That’s why it does not say it is using memory. Check disc i/o as it is generating the message. For linux that can be seen in htop or iotop, for win idk.

    Note that I use lmstudio, that uses llama.cpp to run models. Gpt4all, I think, uses a modified version of same. Doesn’t matter they should all be using mmap to load the file.

    PS Depending on the model I also get a couple tokens per sec on the cpu.

    Edit: Didn’t see someone already said the same, I’l leave this here anyway.