D perfomance

drug drug2004 at bk.ru
Sat Apr 25 12:00:47 UTC 2020


24.04.2020 22:27, Arine пишет:
> On Thursday, 23 April 2020 at 15:57:01 UTC, drug wrote:
>> And your statement that Rust assembly output is better is wrong.
> 

Yes, your statement that Rust assembly output is better is wrong, 
because	one single optimization applicable in some cases does not make 
Rust better in general. Period.

Once again, Rust assembly output can be better in some cases. But there 
is the big difference between these two statements - "better in some 
cases", and "better in general". More over you are wrong twice. Because 
this optimization is not free at all. You pay for it in the form of 
restriction that you can not have more than one mutable reference. This 
means that cyclic data structures are unusually difficult compared to 
almost any other programming language.
Also this optimization is available in C for a long time. Even more - in 
some cases GC based application can be faster that one with manual 
memory management because it allows to avoid numerous 
allocation/deallocation. What you are talking about is premature 
optimization in fact.

> 
> There most definitely is a difference and the assembly generated with 
> rust is better. This is just a simple example to illustrate the 
> difference. If you don't know why the difference is significant or why 
> it is happening. There are a lot of great articles out there, sadly 
> there are people such as yourself spreading misinformation that don't 
> know what a borrow checker is and don't know Rust or why it is has gone 
> as far as it has. This is why the borrow checker for D is going to fail. 
> Because the person designing it, such as yourself, doesn't have any idea 
> what they are redoing and have never even bothered to touch Rust or 
> learn about it. Anyways I'm not your babysitter, if you don't understand 
> the above, as most people seem to not bother to learn assembly anymore, 
> you're on your own.
> 

Self-importance written all over your post. Here you make your third 
mistake - you are very far away of being able to be my babysitter. 
Trying to show your competence you show only your blindly ignorance. The 
world is much less trivial than a function with two mutable references 
not performing any useful work.


More information about the Digitalmars-d mailing list