> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: Re: OT if/else or not if/else

> If you use else-less-if, then there is never an opportunity for
> parellelization, since the program is going to assume that those
> predicates are (a) independent and (b) ordered in a way that the
> programmer intended.

Not quite true.  Modern compilers and CPU cores will speculatively execute code 
sequences in parallel that may later be abandoned when the results of predicate 
evaluation are available; this can be done for both the if-else-if and the 
else-less-if forms.  Regardless, the if-else-if form is much preferred, in 
terms of providing both the compiler and the maintainer with more information 
(and is certainly not premature optimization, by any stretch of the 
imagination).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to