This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求算法优化高手科普一下,Mem bank perf. penalty是什么意思?



我把自己的代码用带有软件流水反馈信息的选项编译了一遍,得到结果如下:

;* A-side B-side
;* .L units 1 0
;* .S units 0 0
;* .D units 2* 2*
;* .M units 0 0
;* .X cross paths 1 0
;* .T address paths 2* 2*
;* Long read paths 0 0
;* Long write paths 0 0
;* Logical ops (.LS) 0 0 (.L or .S unit)
;* Addition ops (.LSD) 1 1 (.L or .S or .D unit)
;* Bound(.L .S .LS) 1 0
;* Bound(.L .S .D .LS .LSD) 2* 1
;*
;* Searching for software pipeline schedule at ...
;* ii = 2 Schedule found with 4 iterations in parallel
;*
;* Register Usage Table:
;* +-----------------------------------------------------------------+
;* |AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB|
;* |00000000001111111111222222222233|00000000001111111111222222222233|
;* |01234567890123456789012345678901|01234567890123456789012345678901|
;* |--------------------------------+--------------------------------|
;* 0: | ** * | ** * * |
;* 1: |* ** **** | ****** |
;* +-----------------------------------------------------------------+
;*
;* Done
;*
;* Loop will be splooped
;* Collapsed epilog stages : 0
;* Collapsed prolog stages : 0
;* Minimum required memory pad : 0 bytes
;*
;* Minimum safe trip count : 1
;* Min. prof. trip count (est.) : 2
;*
;* Mem bank conflicts/iter(est.) : { min 0.000, est 0.500, max 2.000 }
;* Mem bank perf. penalty (est.) : 20.0%
;*
;* Effective ii : { min 2.00, est 2.50, max 4.00 }
;*
;*
;* Total cycles (est.) : 6 + min_trip_cnt * 2 = 1414

以前的代码这部分很小,5%以内,所以我也没关心,这次变得很大,我想知道这是什么意思,会造成什么影响,如何避免。谢谢。