avoid toLower in std.algorithm.sort compare alias
Steven Schveighoffer
schveiguy at yahoo.com
Tue Apr 24 07:56:35 PDT 2012
On Tuesday, 24 April 2012 at 14:54:48 UTC, Steven Schveighoffer
wrote:
> On Tuesday, 24 April 2012 at 11:24:44 UTC, Regan Heath wrote:
>> After watching Andrei's talk on generic and generative
>> programming I have to ask, which routines are you avoiding ..
>> it seems we need to make them as good as the hand coded code
>> you've written...
>
> from memory (don't have the code in front of me right now), it
> was std.uni.decode, and using foreach(dchar d; str) (which
> cannot be inlined currently).
>
> IIRC, std.uni.decode was not being inlined. So I tried
> hand-inlining it (I also discovered some optimizations it was
> not using), and it made a huge difference.
BTW, you can check out my github branch of phobos named new-io2,
look at the textstream struct to see what I've inlined.
-Steve
More information about the Digitalmars-d-learn
mailing list