At 04:57 PM 6/12/2002 -0700, you wrote:
> public String getProperty(String name) {
> - if (name == null) {
> - return null;
> - }
> - String property = (String) properties.get(name);
> - return property;
> + return (name == null ? null : (String) properties.get(name));
> }
Does this have any speed benefits? ie, does it map down to a conditional
move CMOV opcode on x86 so you avoid a speculation/branch misprediction
penalty, or is it just a style thing?
Just a style thing.
Cheers,
Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
- John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>