Буду признателен за идеи, как можно ускорить этот код. Код работает правильно, но довольно медленно. Может быть, как-то можно уйти от вложенных циклов или еще что-то? Заранее спасибо!
ReDim ABCDE (1 To MatrixRows, 1 To 17^5*5) As Integer
For a = -2.4 To 2.4 Step 0.3
For b = -2.4 To 2.4 Step 0.3
For c = -2.4 To 2.4 Step 0.3
For d = -2.4 To 2.4 Step 0.3
For e = -2.4 To 2.4 Step 0.3
VAR = VAR + 1
VAR5 = VAR*5 - 5
For LOOP_CASE = 1 To MatrixRows
ABCDE (LOOP_CASE, 1+VAR5)=Round(7+3*(HR_PRED(LOOP_CASE, 73)+c)+2*(HR_PRED(LOOP_CASE, 72)+b)-1.4*(HR_PRED(LOOP_CASE, 74)+d)-3*(HR_PRED(LOOP_CASE, 71)+a)-3.*(HR_PRED(LOOP_CASE, 75)+e),0)
ABCDE (LOOP_CASE, 2+VAR5)=Round(5+2*(HR_PRED(LOOP_CASE, 71)+a)+0.5*(HR_PRED(LOOP_CASE, 74)+d)-0.05*(HR_PRED(LOOP_CASE, 72)+b)-0.4*(HR_PRED(LOOP_CASE, 73)+c)-0.3*(HR_PRED(LOOP_CASE, 75)+e),0)
ABCDE (LOOP_CASE, 3+VAR5)=Round(2*(HR_PRED(LOOP_CASE, 75)+e)+2*(HR_PRED(LOOP_CASE, 71)+a)+1.18*(HR_PRED(LOOP_CASE, 74)+d)-6*(HR_PRED(LOOP_CASE, 72)+b)-2.5*(HR_PRED(LOOP_CASE, 73)+c),0)
ABCDE (LOOP_CASE, 4+VAR5)=Round(1.7*(HR_PRED(LOOP_CASE, 73)+c)+1.13*(HR_PRED(LOOP_CASE, 75)+e)+0.17*(HR_PRED(LOOP_CASE, 72)+b)-0.5*(HR_PRED(LOOP_CASE, 74)+d)-1.15*(HR_PRED(LOOP_CASE, 71)+a),0)
ABCDE (LOOP_CASE, 5+VAR5)=Round(72+3*(HR_PRED(LOOP_CASE, 73)+c)+1.2*(HR_PRED(LOOP_CASE, 74)+d)-0.2*(HR_PRED(LOOP_CASE, 72)+b)-2.8*(HR_PRED(LOOP_CASE, 71)+a)-3*(HR_PRED(LOOP_CASE, 75)+e),0)
Next LOOP_CASE
Next e
Next d
Next c
Next b
Next a