Earlier quoted context omitted.
The benchmark now includes maximum resident memory usage. Go does indeed perform quite well (at least with 6g), using around 30MiB, compared to around 25/26MiB for the non-garbage-collected languages. Scala is memory-heavy, as expected, and Rust seems to use a surprising amount of memory for some reason.
Don't forget about Nimrod which performs extremely well for a garbage collected language. And D which does too.
Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
21–30 of 58 posts
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#22Haskell was excluded from this benchmark because I can't figure it out.
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#23Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#24Really nice article. > I think there may be a more concise way to parallelise parts of the problem in Rust, using something like (from the Rust docs): > > let result = ports.iter().fold(0, |accum, port| accum + port.recv() ); We plan to have convenient fork/join style parallelism constructs, so that you don't have to build it yourself using message passing or unsafe code. There is a prototype in the `par.rs` module i…
I'd like to test it with the new Rust-coded runtime, especially if it's faster, but I won't have time to build it for a couple of days. I actually avoided building it earlier because I thought the new scheduler was slower and needed time to mature (I think I read that it doesn't yet swap tasks between threads, or something along those lines?), but I must have misread.
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#25https://github.com/logicchains/Levgen-Parallel-Benchmarks/pu...
Go performance improves from ~470 ms to ~360 ms on my Quad core MBP 15 (Late 2011)
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#26Why are you parallelizing these in such different ways? For example, in Go you start 800 goroutines, but in others you start just 4 threads/tasks as worker pool. I would imagine indeed these would give quite different results.
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#27Why are you parallelizing these in such different ways? For example, in Go you start 800 goroutines, but in others you start just 4 threads/tasks as worker pool. I would imagine indeed these would give quite different results.
It's done differently in Go because someone else wrote it, and I found it to be faster than the version I wrote using a worker pool of 4 tasks. If you look closely you'll see it doesn't actually ever run more than 4 goroutines simultaneously.
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#28Have sent in a pull request: https://github.com/logicchains/Levgen-Parallel-Benchmarks/pu... Go performance improves from ~470 ms to ~360 ms on my Quad core MBP 15 (Late 2011)
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#29Really nice article. > I think there may be a more concise way to parallelise parts of the problem in Rust, using something like (from the Rust docs): > > let result = ports.iter().fold(0, |accum, port| accum + port.recv() ); We plan to have convenient fork/join style parallelism constructs, so that you don't have to build it yourself using message passing or unsafe code. There is a prototype in the `par.rs` module i…
I'd like to test it with the new Rust-coded runtime, especially if it's faster, but I won't have time to build it for a couple of days. I actually avoided building it earlier because I thought the new scheduler was slower and needed time to mature (I think I read that it doesn't yet swap tasks between threads, or something along those lines?), but I must have misread.
4.8 has been out for quite some time, I did a quick comparison using your benchmark between gcc 4.8.1 and clang 3.3 on my system and clang still won but the difference was ~3.5% on my machine.
Re: Parallel Roguelike Lev-Gen Benchmarks: Rust, Go, D, Scala and Nimrod
#30Earlier quoted context omitted.
It's done differently in Go because someone else wrote it, and I found it to be faster than the version I wrote using a worker pool of 4 tasks. If you look closely you'll see it doesn't actually ever run more than 4 goroutines simultaneously.
I noticed that, but you're still allocating for 800 goroutines in the end. I guess in the scope of the benchmark, that is still relatively cheap. It just was a red flag for me.