On 24 Mar 2016, at 2:49pm, Richard Hipp <drh at sqlite.org> wrote:

> On 3/24/16, Simon Slavin <slavins at bigfraud.org> wrote:
>> 
>> I want the next generation of compilers to require
>> that the programmer specify an initial value (a constant, not a calculated
>> value) for every variable they define, including every array element when
>> they define an array.
> 
> At https://www.sqlite.org/src/info/03b2a622?ln=3553-3560 is just one
> example where unnecessary local variable initialization has a large
> performance impact.  There are *many* other such examples in SQLite.
> This one just has the best comment.

Yup.  The compiler has to decide whether to compile the statement (presumably 
it uses path analysis).  But it should be in the source code to force the 
programmer to worry about the problem.  Purely my opinion.

Simon.

Reply via email to