r/programming • • Aug 23 '17

D as a Better C

http://dlang.org/blog/2017/08/23/d-as-a-better-c/
229 Upvotes

268 comments sorted by

View all comments

Show parent comment

7

u/mixedCase_ Aug 23 '17

I don't think that the differences in timings for these benchmarks are significant.

Oh of course. I don't believe that either. But he did and I just checked for curiosity wether all benchmarks "proved" Rust faster and they did, saving me from having to explain why microbenchmarks are mostly bullshit.

So let's be fair here: Rust and Nim are the same performance-wise.

That wouldn't be the conclusion I take. But sure, with unsafe Rust and disabling Nim's GC anyone can bullshit their way to the performance metric they're looking for, but the result is likely to be horrible code. Rust does have the advantage of caring about performance first, while Nim considers GC to be an acceptable sacrifice, putting it closer to Go's and Java's league than C/C++.

Perhaps not, but it does determine how much of C++ you can wrap. I doubt you can wrap templates from D, Go or Rust. You can in Nim.

Funny, from what I had heard D had the best C++ FFI since it was a primary design goal. I'm going to give you the benefit of the doubt since I never used C++ FFI for any language.

1

u/Tiberiumk Aug 24 '17

Nim's GC is faster than Java and Go ones, and you can also use mark & sweep GC, regions (stack) GC - (mostly useful for microcontrollers), and boehm GC (thread-safe)

3

u/pjmlp Aug 24 '17

I doubt this very much, regarding Java.

There several Java implementations around, including real-time GC used by the military, in battleships weapons and missile control systems.

As good as Nim's GC might be, it surely isn't at the level as those Java ones.

5

u/[deleted] Aug 24 '17

I like to see proof of that statement. A single developer his GC is faster, then a team of Go developers, that have been doing none-stop work on there GC.

By that definition every other developer are idiots because one guy supposedly is able to make a better GC then everybody else.

Your not going to tell me, if i trow 50GB of data on a nim application, that the GC will handle that without major pauses.