VXCMD local and remote together
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Feb 19 16:04:38 CST 2004
on 2/19/04 3:14 PM, Robert Brenstein at rjb at rz.uni-potsdam.de wrote:
>>> On the contrary. There are instances when doubling the code is
>>> beneficial. For example, if I have an if-else condition in a loop
>>> that runs thousands times, it is usually better to have two loops
>>> with if-else around them.
>>
>> You talk here about
>>
>> A) seed optimization based on LOOP INVARIANT.
>>
>> B) Refactoring teach:
>>
>> a) yes, move out from loop.
>> but you point here only first step.
>> as you ay you will get doubling code
>>
>> b) refactoring require now second step:
>> EXTRACT METHOD STEP: move that doubling code into separate
>> function. So you will have just SINGLE code.
>
> But having to call a separate function in such a loop incurs an
> overhead in most environments which kills the effect of remove if
> from the loop. Function inlining, which does the opposite, is
> recommended in many instances.
Right.
And in C++ we can do such kind of refactoring with small or ZERO overhead,
Because C++ do have inlines.
> The thing is, Ruslan, that what applies to your development and
> coding, may not be true for what we do :)
Probably yes
> My background is with numerical analysis, programs that require weeks of cpu
> time for a single run. And my primary use of Valentina is for web-served
> databases, where again every bit of performance counts. So I rather inline
> than extract and double the code if I gain speed.
Hmm, let me ask.
And you do this numerical analyze in xCards?
I think C++ is the only right choice Robert for such tasks.
And again, in C++ we can extract method and mark it as inline.
Then compiler will return it back. But I have in project SINGLE piece of
code then.
> There are also stylistic differences arising from programming
> environments and some of the logic that is natural in C++ feels
> awkward in them (cf. our earlier discussions on creating and opening
> databases with encryption).
Your idea will work great in C++ SDK also.
There is HIGH level API and internal API.
Just your idea is better.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list