Optimizing Java using D

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 23 08:15:32 PDT 2014


On Sat, 21 Jun 2014 07:50:29 -0400, Marc Schütz <schuetzm at gmx.net> wrote:

> On Saturday, 21 June 2014 at 05:40:32 UTC, Tofu Ninja wrote:
>> On Saturday, 21 June 2014 at 03:52:54 UTC, logicchains wrote:
>>> Blog author here, I've added a note that D's sort matches the speed of  
>>> C++'s when the stable sort is used instead of the default unstable. I  
>>> don't think there's anything wrong with D's unstable sort however, as  
>>> the C++ version also performs worse when using std::sort (unstable)  
>>> instead of std::stable_sort.
>>
>> Awesome! Glad to see D shown in a good light :) Great article btw.
>>
>> On another note, if someArray.sort() calls the built in sort even when  
>> std.algorithm is imported, then most definitely built in sort needs to  
>> go, I can see plenty of times where people would not even realize they  
>> were calling the wrong sort or even that there was an error in their  
>> code.
>
> It's a bit more subtle: `someArray.sort()` calls std.algorithm's sort,  
> while `someArray.sort` (without parens) calls the built-in sort. But  
> yes, the latter needs to go.

Indeed. It's like a rotten easter egg. Needs to be killed with fire.

-Steve


More information about the Digitalmars-d mailing list