Challenge: write a really really small front() for UTF8

dennis luehring dl.soluz at gmx.net
Tue Mar 25 03:42:58 PDT 2014


Am 25.03.2014 11:38, schrieb Nick Sabalausky:
> On 3/25/2014 4:00 AM, Iain Buclaw wrote:
>> On 25 March 2014 00:04, Daniel N <ufo at orbiting.us> wrote:
>>> On Monday, 24 March 2014 at 12:21:55 UTC, Daniel N wrote:
>>>>
>>>> I'm currently too busy to submit a complete solution, but please feel free
>>>> to use my idea if you think it sounds promising.
>>>
>>>
>>> I now managed to dig up my old C source... but I'm still blocked by dmd not
>>> accepting the 'pext' instruction...
>>>
>>> 1) I know my solution is not directly comparable to the rest in this
>>> thread(for many reasons).
>>> 2) It's of course trivial to add a fast path for ascii... if desired.
>>> 3) It throws safety and standards out the window.
>>>
>>
>>
>> 4) It's tied to one piece of hardware.
>>
>> No Thankee.
> void doStuff() {
>       if(supportCpuFeatureX)
>           doStuff_FeatureX();
>       else
>           doStuff_Fallback();
> }
>
>   > dmd -inline blah.d

the extra branch could kill the performance benefit if doStuff is too small


More information about the Digitalmars-d mailing list