gdl icon indicating copy to clipboard operation
gdl copied to clipboard

discussion of preformance issue as seens by TEST_OP_POWER on large arrays

Open alaingdl opened this issue 2 years ago • 0 comments

Please remember that, today TIME_TEST4 is faster in current GDL than in IDL 8.8

But for most of the operations, on a 48-core machine, with : TEST_OP_POWER, 1E8, performances of IDL are way better (3 to 10 times faster) except for power 3.5

(for 1e7 and 1e6, discrepancies are more limited)

I have no experience with C++11 new capability "valarray" + pow https://www.cplusplus.com/reference/valarray/pow/ by I suspect we have to test that !

A.

IDL> TEST_OP_POWER, 1E8
% Compiled module: TEST_OP_POWER.
some tests on POWER mathematical OPerations
First test are on LONG INTEGER
Product (x1 * x2): .......     0.018408060
Equiv. Square (x1 * x1): .     0.015163898
Real Square Op (x^2): ....     0.019263983
Cube Op (x^3): ...........     0.019178867
3.5 Op:(int-->flt)........      0.21213603
^4 Op: ...................     0.022486925
Second test are on FLOAT
Product (x1 * x2):. ......     0.016569853
Equiv. Square (x1 * x1): .     0.014093876
Real Square Op (x^2): ....     0.024669886
Cube Op (x^3): ...........     0.024806976
3.5 Op:(int-->flt)........      0.19396806
^4 Op: ...................     0.026787996

GDL> TEST_OP_POWER, 1E8
% Compiled module: TEST_OP_POWER.
some tests on POWER mathematical OPerations
First test are on LONG INTEGER
Product (x1 * x2): .......      0.15494895
Equiv. Square (x1 * x1): .      0.12177396
Real Square Op (x^2): ....     0.067502975
Cube Op (x^3): ...........      0.22579312
3.5 Op:(int-->flt)........     0.091262102
^4 Op: ...................      0.19624090
Second test are on FLOAT
Product (x1 * x2):. ......      0.15187788
Equiv. Square (x1 * x1): .      0.11982489
Real Square Op (x^2): ....     0.051900148
Cube Op (x^3): ...........      0.15119600
3.5 Op:(int-->flt)........     0.038867950
^4 Op: ...................      0.15120792

alaingdl avatar Mar 03 '22 23:03 alaingdl