TypeFunction example: ImplictConvTargets

Walter Bright newshound2 at digitalmars.com
Wed Oct 7 03:47:33 UTC 2020


On 10/6/2020 11:09 AM, Adam D. Ruppe wrote:
> The Phobos implementation started life with a very simple implementation too. It 
> became what it is because it *had to*, specifically for performance reasons.

Professional C Standard library implementations tend to be hideous code to 
perform objectively simple operations. The reason is speed is so desirable in 
foundational code that it drives out all other considerations. (memcpy() is a 
standout example.)

I remember back in the 80's when Borland came out with Turbo C. The compiler 
didn't generate very good code, but applications built with it were reasonably 
fast. How was this done?

Borland carefully implemented the C library in hand-optimized assembler by some 
very good programmers. Even printf was coded this way. The speedups gained there 
sped up every Turbo C program. At the time, nobody else had done that.

Much as I hate to admit it, Borland made the smart move there.



More information about the Digitalmars-d mailing list