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

Author

Jin Zhang1

Keywords

Differential Evolution, Peak Function, C++, Matlab

Review Status

Unreviewed

Abstract

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.

DE_Peak_1.jpg

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

DE_Peak_2.jpg
New_1(2).bmp

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

New_2.bmp

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.

New_3.bmp

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