>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.
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.
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.
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.
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.
>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?
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.
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
You can do better than that, OP
C version: https://godbolt.org/z/8n8Ka66Es
Rust version: https://godbolt.org/z/54aG96oYG
>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.
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.
no
> posts himself as 2014 image chad
> file.png
This is what Cniles actually think themselves to be.
Your code would be plenty bloated in C++ if you instantiated this many templates.
Post all flags? Did you go inked stdlib statically?
>Killed - processing time exceeded
>Program terminated with signal: SIGKILL
This is the second time I've seen that atrocious rust example. What obfuscator did you use?
What are you talking about? That's normal code
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.
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
I have a friend that uses Rust and she said it runs faster than C
>she said
buddy... I like rust but... come on dawg.
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
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.
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
>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!
>but muh heckin rust has no UB!
Rust has no standard. The GNU Project will add UB for the lulz.
>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
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.
>Rust version: https://godbolt.org/z/54aG96oYG
>Killed - processing time exceeded
>Program terminated with signal: SIGKILL
are you moronic? did you even glance at the code?
Spreading fake news and propaganda against Rust won't keep your language relevant, cnile.
Why does such a minuscule code change result in such a massive difference in codegen? Sounds like a language full of footguns.
Because Rust is expressive and you can do more with less code. The OP version is doing more with miniscule added code.
Indeed, it looks like you can waste a ton of instructions with very little code!
Yes, because you can do more with very little code. It's called "expressiveness".
>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?
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.
and C is bloated
You linked the C program statically with glibc and the Rust program probably dynamically with glibc
Now link both statically with musl
>i-i-it doesn't count
>n-now link it that way so I can w-win
no way bloatboy
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