[fpc-devel] RFC: customvariant handling in variants.pp and fmtbcd.pp

Sergei Gorelkin sergei_gorelkin at mail.ru
Sun Mar 27 17:08:09 CEST 2011


LacaK пишет:

> I have attached minor "rearangement", consider them please
> 
Will do. It's possible to go even further and completely exclude finalization and try..finally 
block, because the intermediate Variant is always of type Double, which doesn't need finalization.

> 
> I have looked again at function FindCustomVariantType and I see there :
> 
> 3590     Result:=(aVarType>=CMinVarType);
> 3591     if Result then
> 
> So it seems to me, that for standard variant types is control 
> immediately returned, so no performance problem should exist there with 
> entering critical section and so on.
> Or I missed something ?
> 
Indeed. Probably, after I wrote a number of improvements and tests for that part, something was left 
in a locked state in my central processing unit aka brain, making me think otherwise :)

Regards,
Sergei





More information about the fpc-devel mailing list