Re: [patch] change increment/decrement operators from postfix to prefix

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 02 Jul 2012 23:26:15 +1200

On 2/07/2012 10:08 p.m., Kinkie wrote:
> Hi all,
> this patch (for trunk) is a first chunk of a janitorial task
> changing all operator++ and operator-- from postfix to prefix form
> where it doesn't impact the code flow. There are other cases where a
> more in-depth refactoring may improve readability, but I'll save them
> for more focused activities.
> I'd like to be authorized to commit directly to trunk for this (and
> subsequent) chunks.
>
> Thoughts?

Any profiling done to show the benefits?

I'm finding a LOT of mixed results from many people on which of pre/post
increment is actually faster.
The rule of thumb was created decades ago when compiler
auto-optimization was young.

++1 from me. IMO this can go on trunk anytime.

Cleanup re-naming of symbols is where we need to be careful. Because I
can get a little mixed up when porting followup pathes to an older branch.

Amos
Received on Mon Jul 02 2012 - 11:26:25 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 02 2012 - 12:00:05 MDT