I’ve spent months working on this program. I’ve long thought that “how fast can you make a FizzBuzz” would be a really interesting question for learning about high-performance programming, and when I subsequently saw this question posted on CGCC, I pretty much had to try.

This is so beautiful 🥹

edit: outjerked yet again https://codegolf.stackexchange.com/a/269772

  • nick@midwest.social
    link
    fedilink
    arrow-up
    7
    ·
    4 hours ago

    This isn’t even really C, it’s a bunch of assembly instructions jammed into C

    Not that it’s not impressive… but still.

    • fxomt@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      14
      ·
      4 hours ago

      Correction: This is not C. It may seem so because of the #include’s and #define’s but this is just standard gnu assembler syntax. You can notice that the included files are all in asm/ and the macros are just valid assembly.

      It’s built with GCC instead of as because gcc links the standard library (which include those asm/ files) for you. Though you can build it normally with as, too.

      Heavy, iirc. I haven’t done this stuff in a while so please correct me if i’m wrong.