home Forums # Technical Support Execution speed Reply To: Execution speed

#2028
Unknown
Member

Hi
Thanks for your help. The changes have improved the performance by 6% and 11% with -DFL_USE_FLOAT=ON.
see below for the new performance report:

Nom de la fonction	Échantillons inclusifs	Échantillons exclusifs	% d'échantillons inclusifs	% d'échantillons exclusifs
std::_Lockit::_Lockit	164 400	164 400	3,86	3,86
std::_Lockit::~_Lockit	154 973	154 973	3,64	3,64
fl::Antecedent::activationDegree	1 827 003	142 519	42,92	3,35
std::_Iterator_base12::_Adopt	258 770	71 718	6,08	1,68
std::_Iterator_base12::_Orphan_me	69 654	69 654	1,64	1,64
fl::Aggregated::membership	370 004	57 360	8,69	1,35
fl::Operation::isEq	199 016	51 960	4,68	1,22
fl::Operation::isNaN<float>	47 240	47 240	1,11	1,11
fl::Ramp::membership	292 940	43 361	6,88	1,02
fl::Activated::membership	237 920	42 495	5,59	1,00
std::_Iterator_base12::operator=	251 390	36 560	5,91	0,86
std::vector<fl::Activated,std::allocator<fl::Activated> >::size	30 772	30 772	0,72	0,72
std::_Container_base12::_Orphan_all	29 263	29 263	0,69	0,69
std::_Iterator_base12::~_Iterator_base12	260 649	29 018	6,12	0,68
std::_Iterator_base12::_Iterator_base12	280 520	26 367	6,59	0,62
std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<fl::Hedge *> > >	318 347	16 826	7,48	0,40

In Antecedent::activationDegree function, bottlenecks are at this lines :
`37.6%: return conjunction->compute(
this->activationDegree(conjunction, disjunction, fuzzyOperator->left),
this->activationDegree(conjunction, disjunction, fuzzyOperator->right));

14%: if (fuzzyOperator->name == Rule::andKeyword()) {

8.6%: for (std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin();
11.3%: rit != proposition->hedges.rend(); ++rit) {

3.3%: result = proposition->term->membership(inputVariable->getInputValue());`

Cheers