Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
31.05.2016 21:55, Adriano dos Santos Fernandes wrote: > On 31/05/2016 13:58, Dimitry Sibiryakov wrote: >> Yes, you could save time you wasted protecting status quo with simple >> "why not, it >> won't hurt". If you didn't noticed, I just suggested to add a rule to guide, >> not to start >> re

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Adriano dos Santos Fernandes
On 31/05/2016 13:58, Dimitry Sibiryakov wrote: >Yes, you could save time you wasted protecting status quo with simple "why > not, it > won't hurt". If you didn't noticed, I just suggested to add a rule to guide, > not to start > rewriting code. > Your rule breaks the most used class in the

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
31.05.2016 18:41, Alex Peshkoff wrote: > Function is used to merge lists of client and server plugins. I doubt > it's worth optimization. I know what it does. Problem is that it does something more, something that is not obvious from first glance. > Certainly pop > performs constructor, it c

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Alex Peshkoff
On 05/31/2016 06:55 PM, Dimitry Sibiryakov wrote: > 31.05.2016 17:34, Alex Peshkoff wrote: >> I hardly believe strings can affect performance seriously. >> They are typically not used for objects in deep layers. > Yes, I doubt that these little things can win more than a couple of > percents,

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Adriano dos Santos Fernandes
On 31/05/2016 13:24, Dimitry Sibiryakov wrote: > 31.05.2016 18:14, Adriano dos Santos Fernandes wrote: >> We don't need to be aware of non important things, string must be easy >> to use, period. >Then you cannot be sure that none of these places is performance critical. >Speed of code writ

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Alex Peshkoff
On 05/31/2016 07:14 PM, Adriano dos Santos Fernandes wrote: > On 31/05/2016 13:09, Dimitry Sibiryakov wrote: >> 31.05.2016 17:54, Adriano dos Santos Fernandes wrote: >>> String class is general class to be used everywhere except in >>> performance needed code. >>> >>> As a general class, should be

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
31.05.2016 18:14, Adriano dos Santos Fernandes wrote: > We don't need to be aware of non important things, string must be easy > to use, period. Then you cannot be sure that none of these places is performance critical. Speed of code writing is unimportant. Only speed of code execution is.

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Adriano dos Santos Fernandes
On 31/05/2016 13:09, Dimitry Sibiryakov wrote: > 31.05.2016 17:54, Adriano dos Santos Fernandes wrote: >> String class is general class to be used everywhere except in >> performance needed code. >> >> As a general class, should be simple to use with implicit constructors >> and conversions. >T

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
31.05.2016 17:54, Adriano dos Santos Fernandes wrote: > String class is general class to be used everywhere except in > performance needed code. > > As a general class, should be simple to use with implicit constructors > and conversions. This is good, but are you aware how many places in code

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
31.05.2016 17:34, Alex Peshkoff wrote: > I hardly believe strings can affect performance seriously. > They are typically not used for objects in deep layers. Yes, I doubt that these little things can win more than a couple of percents, but still they eat common resources such as CPU or memory

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Adriano dos Santos Fernandes
On 31/05/2016 12:22, Dimitry Sibiryakov wrote: >Hello, All. > >During string class refactoring I tried to declare all constructors > explicit because > they are relatively heavy in term of data moving. And it was amazing to see > in how many > places in code compiler is implicitly creat

Re: [Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Alex Peshkoff
On 05/31/2016 06:22 PM, Dimitry Sibiryakov wrote: > Hello, All. > > During string class refactoring I tried to declare all constructors > explicit because > they are relatively heavy in term of data moving. And it was amazing to see > in how many > places in code compiler is implicitly cr

[Firebird-devel] Implicitly created temporary objects

2016-05-31 Thread Dimitry Sibiryakov
Hello, All. During string class refactoring I tried to declare all constructors explicit because they are relatively heavy in term of data moving. And it was amazing to see in how many places in code compiler is implicitly creating temporary objects. I'm sure that in some cases it was