We are forking D

H. S. Teoh hsteoh at qfbox.info
Tue Jan 9 00:51:35 UTC 2024


On Mon, Jan 08, 2024 at 03:37:22PM -0800, Walter Bright via Digitalmars-d wrote:
> On 1/7/2024 8:00 PM, H. S. Teoh wrote:
> > [...]
> 
> Over the years, again and again, I've seen published benchmarks
> (including ones posted in this forum) that purport to benchmark a
> section of code, yet never realizing that there was a printf and they
> were just benchmarking printf.

On the other extreme, there were also benchmarks that were actually
measuring background noise instead of the function it's purportedly
benchmarking, because the optimizer has elided the entire function call
after realizing that the return value is never used.  LDC has a tendency
to do this. :-P  It also has the tendency of executing simple functions
at compile-time and replacing the function call with an instruction that
loads the answer.


> Borland made a very smart move back in the day with TurboC. The
> Borland C compiler generated rather poor code. So Borland hired a guy
> who coded their printf implementation in highly optimized assembler.
> With a fast printf, people tended to not notice the generated C code
> was slow.

:-D


T

-- 
It won't be covered in the book. The source code has to be useful for something, after all. -- Larry Wall


More information about the Digitalmars-d mailing list