News for hackers. Stuff that matters.
Re:A Quick Comparison of Nim vs. Rust by dom96 on Tuesday January 13, 2015 @10:43PM (#8884158)
Are you just using --opt:speed to compile the Nim examples? For maximum performance you should be using -d:release.
Re:A Quick Comparison of Nim vs. Rust by mrob on Tuesday January 13, 2015 @11:08PM (#8884237)
-d:release disables bounds checking, so the Rust examples would have to be modified for unchecked indexing for a fair comparison.
Re:A Quick Comparison of Nim vs. Rust by dom96 on Tuesday January 13, 2015 @11:26PM (#8884304)
It disables a lot of other things too. The current comparison is unfair. Why do the examples need to be modified to disable bounds checking for Rust? If it's easier you can compile the Nim examples with -d:release and enable bounds checking by also supplying --boundChecks:on.
Re:A Quick Comparison of Nim vs. Rust by arthurtw on Wednesday January 14, 2015 @01:34AM (#8884695)
I’ve added additional results with Nim’s --boundChecks:on flag. Thank you two for the suggestions.
Re:A Quick Comparison of Nim vs. Rust by arthurtw on Wednesday January 14, 2015 @01:01AM (#8884586)
Oh, my bad. The numbers differ a lot (2~2.5x faster). I’ve updated the article.
Re:A Quick Comparison of Nim vs. Rust by omaranto on Wednesday January 14, 2015 @08:58AM (#8886206)
Now it's more in line with my experience of Nim usually being quite a bit faster than Rust, not to mention much easier to write and less verbose (text munging code in Rust seemed to be about 15% calls to as_slice() and to_string ()).
Re:A Quick Comparison of Nim vs. Rust by kibwen on Wednesday January 14, 2015 @09:32AM (#8886419)
The as_slice situation was acknowledged to be deplorable, and is being vastly improved in the runup to 1.0.

As for speed, please file a performance bug! We love to know where we're missing out on optimizations.

https://github.com/rust-lang/rust/issues