How do you compare valarrays performance against inline arrays?

Is there a significant penalty for using the more convenient valarray over inline arrays? Do you know about some tests?

+3
source share
3 answers

valarrayaims to improve the chances of getting good optimization. For better or worse, it has become something of a forgotten step-child of the standard library; I don’t know of any implementations that do a lot to take advantage of what it provides. Worse, the design was really designed for vector processors and doesn't work very well with processors that use caching heavily - which is almost all the more.

- , (, ) ( std::vector), , , , std::vector .

" ", : - , , , , , , . valarray : , , .

Cray (), - 64 , () , 64 , . "" , 64- , , . , 64x. , 2-4 - , , .

+7

, ( ) . valarray new[], .

​​, , .

Google http://met.sourceforge.net/, .

+1

, . , . , , - , , :)

However, I'm curious why you want to do this instead of using vector?

0
source

Source: https://habr.com/ru/post/1741179/


All Articles