But admit this boost is only seen in ‘an obscure filter’.

  • @[email protected]
    link
    fedilink
    English
    176 days ago

    What does ‘handwritten assembly code’ mean? I assume they’re not writing it in cursive. Apparently some code is compiler created so it sounds like this is a synonym for code written by a person? There must be a better term for describing this than ‘handwritten’.

    • @[email protected]
      link
      fedilink
      English
      1016 days ago

      It means someone wrote actual assembly code instead of writing C code and relying on the compiler to generare optimal assembly for them.

    • @[email protected]
      link
      fedilink
      English
      166 days ago

      Yes, I believe you understand correctly. The vast majority of all native code is written by other computer programs (compilers). Handwritten assembly code usually means code that was instead produced more directly by a human programmer, most probably with the help of an assembler rather than compiling from a higher-level language.

      • @[email protected]
        link
        fedilink
        165 days ago

        As a more concrete example for people out there. C is an example of a “high level” programming language. In C you might write a statement like “int x = 3;”.

        “Assembly language” is a “human readable” representation of the instructions that are actually executed by your CPUs*. There is a different assembly language for each processor or processor family. Your desktop or laptop computer with an Intel or AMD chip, and in all likelihood execute the “x86_64” language. Meanwhile, your phone is probably on the “AArch64” language. An example of assembly language is “mov rax, #3”, which loads register rax with the value 3. Notice that we have dispensed with the niceties of variable names.

        Assembly language is “assembled” into the “machine language.”. To do this, the “human readable” mnemonics like “mov” are replaced with numbers called opcodes. The sequence of opcodes and arguments, like the number 3, are called the “machine code”, because the CPU silicon can read those numbers from memory and follow the instructions with no additional translation steps*.

        *Microcode throws a wrench here. Folks like Intel realized they could run things more efficiently if they translated each machine language instruction into simpler microcode instructions onboard the chip.

    • @[email protected]
      link
      fedilink
      125 days ago

      Here’s an example of inline assembly in C++. You can write assembly inside your higher level code for performance optimizations to just doing really specific things that you can only really do at an assembly level. I’ve never done it before but it definitely is cool when people do it.