[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why are the performance of Rust so bad, benchmarks show it's
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 53
Thread images: 5
File: v7txhrjp9pdqrkdtxxp0_400x400.png (111 KB, 400x400) Image search: [Google]
v7txhrjp9pdqrkdtxxp0_400x400.png
111 KB, 400x400
Why are the performance of Rust so bad, benchmarks show it's on par with Go (-which is not that bad-) but Go is a garbage [spoiler]collected[/spoiler] language running on a virtual machine, isn't rust supposed to produce code as fast as C/C++; it's not even close. Plus Go compiler is quite fast while Rust compiler is slow as fuck (-it's expected tho'-) and give you slower or same speed code. Wtf man ?! They said it was for system programming, they said I could make a fast, safe [spoiler]toy[/spoiler] OS with it. Don't defend them saying the compiler is not mature yet, all the optimizations are already in there, Rust is a meme, Rust is fail, Rust is death.
>>
Go doesn't run on a VM
>>
File: screenshot[1].png (526 KB, 1024x768) Image search: [Google]
screenshot[1].png
526 KB, 1024x768
why aren't you using redox /g/?, a unix-like OS written in Rust

It's a microkernel and already made more progress than GNU/HURD


Microkernel Design
Most features are implemented in Rust
Includes optional GUI - Orbital
Newlib provided for C programs

MIT Licensed
Drivers run in Userspace
Includes common Unix commands
ZFS Filesystem Support (WIP)
>>
>>53764841
Go doesn't run in a VM

the problems with go is just that the type system isn't that great when compared to Rust and no generics among other things


Rust concurrency support isn't that good compared to Go or erlang though
>>
>>53764872
>unix-like
>rust
Instant trash. If there is something the world doesn't need are more fucking UNIX clones.

How about something that hasn't been done for ALMOST FIFTY FUCKING YEARS?
>>
>>53764865
>>53764892
Oh yeah it's true it's fully compiled.
>>
>>53764912
But OS research is dead, DEAD !
t. Rob Pike
>>
Is this a bait post?
Last I read. Rust kicked the shit out of Go performance wise
>>
>>53764978
lmao
>>
>>53764978
Post benchmark now
>>
>>53765024
Rust 14.60
Go 22.00
>>
>>53764841
>It's not even close

Bait.

http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html
>>
File: 1452389563406.gif (494 KB, 200x200) Image search: [Google]
1452389563406.gif
494 KB, 200x200
>>53764841
What?

Give source, because from what I've seen it always get similar performance to C/C++ and Go is always slower.

http://benchmarksgame.alioth.debian.org/
>>
>>53765024
http://benchmarksgame.alioth.debian.org/u64q/rust.html // C
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=gpp // C++
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=java
There are several things that are not realized in Rust yet, so some rust tests are made slower way than c/c++/go.
And there would be MIR-level optimizations too in future.
>>
Ayy all those buttblasted SJW
>>
>>53765119
No matter how ""SJW"" Rust's development community may be, it's a good product.
>>
>>53765119
>SJW
That's not Ruby thread.
>>
Isn't rust compiler just acting as front end for llvm? it can't be that slow.
>>
>>53765163
It is. OP is just baiting.
>>
File: 1457379309779.jpg (355 KB, 1920x3000) Image search: [Google]
1457379309779.jpg
355 KB, 1920x3000
>>53765119
There are no sjw-related people in Rust community. Only one combat commie in support, but he is not programmer, just doing PR things and documentation.
non-cis level is ruby, not rust
>>
>>53765212
Steve Klabnik my man
rust is strictly non-cis level
>>
>>53765254
He is the only one. Other just don't give a shit about this.
>>
>>53765212
keep telling that to yourselves kek when there is so much proof that proves otherwise
>>
>>53765212
Klabnik isn't just documentation. He's one of the key rusters.
>>
Are CIS-straight-white-males even allowed to program Rust?
>>
>>53764928
Which it pretty much is.
There's barely been any revolutionary research in the area since Unix, even since Pike held that talk (which was in 2000, mind you).
>>
>>53765385
no
>>
>>53765440
Mr. Pike is just upset because his beloved innovative Plan 9 is being completely and totally eclipsed by Unix-like operating systems like Linux and FreeBSD. Typical cuck-rage.
>>
>>53765519
Pike mentions himself that Plan 9 itself wasn't innovative enough to break the Unix-barrier and that it failed because it wasn't the kind of research he'd like to see as mentioned in his utah2000 talk.
Plan 9 was an improval iteration upon Unix, and Pike says that this kind of research is why OS research is dead (depth instead of breadth).
He basically admits that it sucks as well.
>>
>>53765590
He's still ugly
>>
What's the best ressource to learn rust appart from

https://doc.rust-lang.org/book
>>
File: 1457466555586.jpg (88 KB, 900x600) Image search: [Google]
1457466555586.jpg
88 KB, 900x600
>>53767468
http://rustbyexample.com/
Obviously.
>>
Code a fizzbuzz in rust. I want to see how many implementations we can come up with.
>>
>>53767975
Here is the straightforward implementation
fn main() {
// `n` will take the values: 1, 2, ..., 100 in each iteration
for n in 1..101 {
if n % 15 == 0 {
println!("fizzbuzz");
} else if n % 3 == 0 {
println!("fizz");
} else if n % 5 == 0 {
println!("buzz");
} else {
println!("{}", n);
}
}
}
>>
>>53767468
Example, then Book, then Rustonomicon
>>
>>53764841
Because it still too new.
>>
>>53768009
So is Go
>>
>>53767990
Using match, doesn't work as expected

fn main() {
// `n` will take the values: 1, 2, ..., 100 in each iteration
for n in 1..101 {
match (n % 3, n % 5) {
(0, 0) => print!("fizzbuzz"),
(0, _) => println!("fizz"),
(_, 0) => println!("buzz"),
_ => println!("{}", n)
}
}
}

...
fizz
13
14
fizzbuzz16
17
fizz
19
...
>>
>>53768210
You've forgotten `ln` in first case.
>>
>>53768234
d'oh
>>
>>53767996
>>53767567
Thanks Anon'
>>
>>53765088
You don't need to make excuses for SJWzilla's failures. If the language is slow, it's slow. Full stop. It won't magically get faster from wishing hard and scoring social justice points.
>>
>>53767468
http://dlang.org desu
rust brings nothing new
>>
>>53765363
May I suggest calling a person who programs in rust a Throbbing Boners

> rusters -> rooster -> cock -> throbbing boners
Logically, It checks out.
>>
>>53765129
You mean Python, Haskell or JS thread.
>>
>>53768797
Python and above all Haskell are nazi language used by violent nazi.
>>
>>53768688
Except for popularity.
>>
>>53769416
fake popularity
its all hype and it will die when people realize all the promises were lies
like how rust was supposed to be fast
>>
>>53764872
There is Minix too.
>>
I made integer sorting algorithm that always has O(n) time and memory complexity. It's superior.

use std::thread;
use std::thread::sleep;
use std::time::Duration;

fn main() {
let v = vec![12, 61, 72, 2, 78, 28, 57, 7, 27, 45, 14, 96, 85, 32, 77, 15, 49, 29, 63, 53, 10, 37, 5, 8, 90, 69, 18, 83, 48, 0, 73, 68, 30, 24, 66, 84, 36, 98, 74, 44, 89, 80, 26, 87, 56, 76, 91, 60, 93, 54, 20, 42, 94, 31, 95, 23, 65, 19, 62, 33, 79, 52, 71, 59, 46, 88, 82, 99, 43, 25, 67, 64, 1, 21, 92, 58, 70, 16, 97, 13, 11, 47, 81, 41, 38, 9, 22, 51, 35, 3, 50, 39, 4, 55, 75, 17, 40, 6, 34, 86];

for n in v {
thread::spawn(move || {
sleep(Duration::from_millis(n * 10));
println!("{}", n);
});
}
sleep(Duration::from_millis(1000));
}
>>
>>53771795
You did it well :p
>>
>>53767975
>>53767990

fn main() {
(1..).map(|i| match (i%3, i%5) {
(0, 0) => println!("FizzBuzz"),
(0, _) => println!("Fizz"),
(_, 0) => println!("Buzz"),
_ => println!("{}", i),
}).take(100).count();
}
>>
>>53771795
doesn't sort negative numbers
Thread replies: 53
Thread images: 5

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.