A Naïve Study of DE Efficiency under C and Matlab


Jin Zhang1


Differential Evolution, Peak Function, C++, Matlab

Review Status



This study aims at comparing computational efficiency of Differential Evolution under C++ and Matlab platform in finding the maximum point of a modified peak function.

1. Implementation

The C++ code (http://comisef.wikidot.com/local--files/cpp/DE_ALG(1).exe) uses the 'for' loop to implement population evolution, i.e. crossover and mutation. The Matlab code employs vectorization to do the work.

2. Results

The modified peak function has a shape as shown in the following picture.


The DE settings, elitist updates and executed time under Win32 with C++ are reported in the next two figures.


The Matlab outcome using the same settings is shown in the next figure.


After converting the Matlab m function to exe function, the results are shown in the next figure. No significant improvement in executed time is found.


3. Conclusions

C++ provides a more efficient environment than Matlab in the above optimization problem while using the same DE parameter settings.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License