SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Advanced Micro Devices - Moderated (AMD) -- Ignore unavailable to you. Want to Upgrade?


To: Neil Booth who wrote (65068)12/6/2001 8:51:11 PM
From: combjellyRead Replies (1) | Respond to of 275872
 
"Let the compiler take care of the details; they can do as well as any assembler programmer on routines that consist of more than a dozen lines"

Wrong. A good programmer can always beat a compiler. Whether the difference is significant or not is another question.



To: Neil Booth who wrote (65068)12/6/2001 9:45:28 PM
From: Joe NYCRespond to of 275872
 
Neil,

We are not talking about something abstract, but about the concrete code, C code is generated by this routine:

Message 16739967

On the top of the message, you see the times it takes to execute the generated code. If you look at my post, where I rearange the results a bit, you will see that the execution time is linear with the number of case in the switch statement.

Message 16747529

Joe



To: Neil Booth who wrote (65068)12/7/2001 1:13:49 AM
From: kapkan4uRead Replies (2) | Respond to of 275872
 
<If execution time is linear in the number of cases, you
need a better compiler. >

Since the switch in question does not have any break statements in it, the linear behavior is correct.

Kap