republican-creole
site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Post a:
Post a:
AuthorAll Replies


TSI Gabe
Premium,VIP
join:2007-01-03
Chatham, ON
kudos:2

reply to Steve

Re: For those wondering "Why Playstation 3s?"

That was the C compiler optimizing my code into doing nothing quite literally. Sometimes those C optimizations don't really help...


Steve
I know your IP address
Consultant
join:2001-03-10
Yorba Linda, CA
kudos:5

said by TSI Gabe:

That was the C compiler optimizing my code into doing nothing quite literally. Sometimes those C optimizations don't really help...
It's far more likely that your optimizer found a bug in your code than you found a bug in the optimizer.

The problem with compilers is that they do exactly what you ask them too bad women and children won't follow that example

Steve
--
Stephen J. Friedl | Unix Wizard | Microsoft Security MVP | Orange County, California USA | my web site


TSI Gabe
Premium,VIP
join:2007-01-03
Chatham, ON
kudos:2

No Actually removing a printf simply displaying the value being calculated completely removed the md5 function from the code.



Steve
I know your IP address
Consultant
join:2001-03-10
Yorba Linda, CA
kudos:5

said by TSI Gabe:

No Actually removing a printf simply displaying the value being calculated completely removed the md5 function from the code.
The compiler did what it was supposed to do: if you were calling a function that had no side effects, it knew that it could eliminate the call without having any effect on correct operation. It was right.

Benchmarking is a known science; calling your operation in a way that insists on a side effect (as I'm sure you found) lets you get the effect you want.

Steve
--
Stephen J. Friedl | Unix Wizard | Microsoft Security MVP | Orange County, California USA | my web site

Friday, 01-Jun 01:25:17 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics