Rust is slow

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

DMT Has Friends For Me Shirt $21.68

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

  1. 2 months ago
    Anonymous

    You can do better than that, OP
    C version: https://godbolt.org/z/8n8Ka66Es
    Rust version: https://godbolt.org/z/54aG96oYG

    • 2 months ago
      Anonymous

      >635 lines of Rust
      >COOMPILE IT
      >28k lines of assembly
      >Add -Copt-level=3
      >Still 12k lines of assembly
      >Change it to -Copt-level=z
      >Still 9k lines of assembly
      I know that the code is meant to be a joke, but how do you even get 10 thousand lines of assembly in an optimized build from just 600 lines of source code? What the frick is wrong with this language.

      This shit is more bloated than C++ LMAO.

      • 2 months ago
        Anonymous

        no shit. it wasn't created to be faster or more efficient. don't you think the imperceptible loss in efficiency is worth the gain in security? 80% of exploits involve the use of memory vulnerabilities.

        • 2 months ago
          Anonymous

          no

          • 2 months ago
            Anonymous

            > posts himself as 2014 image chad
            > file.png
            This is what Cniles actually think themselves to be.

      • 2 months ago
        Anonymous

        Your code would be plenty bloated in C++ if you instantiated this many templates.

      • 2 months ago
        Anonymous

        Post all flags? Did you go inked stdlib statically?

    • 2 months ago
      Anonymous

      >Killed - processing time exceeded
      >Program terminated with signal: SIGKILL

    • 2 months ago
      Anonymous

      This is the second time I've seen that atrocious rust example. What obfuscator did you use?

      • 2 months ago
        Anonymous

        What are you talking about? That's normal code

      • 2 months ago
        Anonymous

        There's no obfuscator and the only imports are from the standard library. That's normal code compiled with the lastest version of rustc.
        The language is just incredibly bloated, anon.

        • 2 months ago
          Anonymous

          What are you talking about? That's normal code

          Fine, I'll take the bait. Can't make heads or tails of the utter moronation from

          You can do better than that, OP
          C version: https://godbolt.org/z/8n8Ka66Es
          Rust version: https://godbolt.org/z/54aG96oYG

          so here's my attempt: https://godbolt.org/z/nPKv13h18

          • 2 months ago
            Anonymous

            I have a friend that uses Rust and she said it runs faster than C

          • 2 months ago
            Anonymous

            >she said
            buddy... I like rust but... come on dawg.

          • 2 months ago
            Anonymous

            at that point you're comparing gcc vs clang, c++ in clang produces the same shit.
            yes, this can be a trivial argument too that rust only existing because of clangs good graces is a.. good thing? I want rust dead anyway; dogshit ugly language and too many trannies

          • 2 months ago
            Anonymous

            That's true, clang is far too aggressive with loop unrolling sometimes. I've had Rust programs run >2x faster when using -C opt-level=s than opt-level=3. In that specific case, it unrolled a branch heavy loop and the branch predictor just couldn't keep up.

          • 2 months ago
            Anonymous

            gcc is working on a rust frontend so it will survive unfortunately
            the good news is that you will probably be able to compile with -fno-borrow-checker and make troons seethe

          • 2 months ago
            Anonymous

            >NOOOOOOOO YOU CAN'T JUST TURN OFF LE BORROW HECKERINO AND TRANSMUTE A & INTO A &mut
            >hahaha compiler go brrrrrSegmentation fault (core dumped)
            C wins again!

          • 2 months ago
            Anonymous

            >but muh heckin rust has no UB!
            Rust has no standard. The GNU Project will add UB for the lulz.

      • 2 months ago
        Anonymous

        [...]
        Fine, I'll take the bait. Can't make heads or tails of the utter moronation from [...] so here's my attempt: https://godbolt.org/z/nPKv13h18

        >Can't make heads or tails
        If /prog/ was still around they would have unraveled this shit in 10 minutes, it's not even properly obfuscated

      • 2 months ago
        Anonymous

        he didn't use any obfuscator, he's literally just implementing it by manually parsing and building expressions with strings, at run-time, to purposely bloat and slow things down.

    • 2 months ago
      Anonymous

      >Rust version: https://godbolt.org/z/54aG96oYG

      >Killed - processing time exceeded
      >Program terminated with signal: SIGKILL

      • 2 months ago
        Anonymous

        are you moronic? did you even glance at the code?

  2. 2 months ago
    Anonymous

    Spreading fake news and propaganda against Rust won't keep your language relevant, cnile.

    • 2 months ago
      Anonymous

      Why does such a minuscule code change result in such a massive difference in codegen? Sounds like a language full of footguns.

      • 2 months ago
        Anonymous

        Because Rust is expressive and you can do more with less code. The OP version is doing more with miniscule added code.

        • 2 months ago
          Anonymous

          Indeed, it looks like you can waste a ton of instructions with very little code!

          • 2 months ago
            Anonymous

            Yes, because you can do more with very little code. It's called "expressiveness".

  3. 2 months ago
    Anonymous

    >C version shits out a global variable and data race
    >Rust version locks thread and passes a lambda to access the data without race condition
    Why do mods allow troll posts like OP?

    • 2 months ago
      Anonymous

      Wrong on both counts anon. Neither use locks, and the __thread prefix in the C program causes each thread to have its own copy preventing it from being global.

  4. 2 months ago
    Anonymous

    and C is bloated

    • 2 months ago
      Anonymous

      You linked the C program statically with glibc and the Rust program probably dynamically with glibc
      Now link both statically with musl

      • 2 months ago
        Anonymous

        >i-i-it doesn't count
        >n-now link it that way so I can w-win
        no way bloatboy

        • 2 months ago
          Anonymous

          I just want you to do the same thing for both instead of different things
          If you want to do that while making Rust look good you can use -C prefer-dynamic I guess

Your email address will not be published. Required fields are marked *