News for hackers. Stuff that matters.
Re:Rust on Computer Language Benchmarks Game by Rickasaurus on Thursday February 13, 2014 @01:22PM (#7233063)
What's the deal with pidigits? Losing out bad to PHP here even.
Re:Rust on Computer Language Benchmarks Game by legulere on Thursday February 13, 2014 @01:41PM (#7233206)
Bignum math isn't optimized for performance yet.

See this discussion: http://www.reddit.com/r/rust/comments/1xcq1q/c_gcc_vs_rust_w... There are also already some patches making rust a lot less worse: https://github.com/mozilla/rust/pull/12209

Re:Rust on Computer Language Benchmarks Game by pcwalton on Thursday February 13, 2014 @02:45PM (#7233749)
A fix is in the queue. It was a tiny thing. Currently there is an Android buildbot issue that is preventing anything from landing, but hopefully that will be resolved today.
Re:Rust on Computer Language Benchmarks Game by iopq on Thursday February 13, 2014 @01:29PM (#7233117)
because it's not using GMP
Re:Rust on Computer Language Benchmarks Game by saidajigumi on Thursday February 13, 2014 @01:39PM (#7233190)
So if I understand correctly, the pidigits test in this case this isn't a self-contained, fully ported microbenchmark, but rather a test of some random Rust code vs. an optimized library[1]?

If that's true, then what's the point of including pidigits if the entire algorithm isn't going to be ported into all target languages?

[1] GMP, The GNU Multiple Precision Arithemtic Library: https://gmplib.org/

Re:Rust on Computer Language Benchmarks Game by pcwalton on Thursday February 13, 2014 @02:55PM (#7233822)
As I understand it, the rule is "if your language comes with a bignum implementation, you must use it, otherwise you may use GMP". I've been seriously tempted to suggest removing our bignum implementation for this reason (though I won't).
Re:Rust on Computer Language Benchmarks Game by qbproger on Thursday February 13, 2014 @03:08PM (#7233917)
Python uses GMP while having a bignum implementation. I believe any language is allowed to use it.

Python: http://benchmarksgame.alioth.debian.org/u64/program.php?test...

Ruby: http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te...

Re:Rust on Computer Language Benchmarks Game by igouy on Friday February 14, 2014 @09:50AM (#7238761)
There is no such rule.

When someone contributes a Rust pi-digits program that uses GMP it will be shown (as long as it uses the same algorithm).

We get to see both programs that use GMP and programs that don't.

Re:Rust on Computer Language Benchmarks Game by iopq on Thursday February 13, 2014 @01:44PM (#7233239)
It's more of a "testing the platform" rather than the language. You can write a Rust program that runs at exactly the same speed as a C program (the difference here would be clang backend vs. gcc moreso than the choice of language).
Re:Rust on Computer Language Benchmarks Game by wmf on Thursday February 13, 2014 @03:28PM (#7234055)
That becomes more of a pass/fail test (either you're using the fastest known library or you aren't) which isn't very interesting as a benchmark.