Here's a fundamental question to the way PB executables behave:

Which of the following is faster / more efficient?

1) Three separate single-dimension arrays all dimensioned to the same value:

A(#)

B(#)

C(#)

...or

2) A single three-dimensional array:

ABC(3, #)

...where

ABC(1, #) = A(#)

ABC(2, #) = B(#)

ABC(3, #) = C(#)

So that these two statements would be equivalent:

If A(123) = 10 and B(123) = 5.41 and C(123) = 1000 then

If ABC(1, 123) = 10 and ABC(2, 123) = 5.41 and C(3, 123) = 1000 then

The data are all related and will always be dimensioned to the same index.

I don't care about the look of the resulting coding, I'm curious which will execute faster when compiled.

???

Many thanks,

--Tom

Which of the following is faster / more efficient?

1) Three separate single-dimension arrays all dimensioned to the same value:

A(#)

B(#)

C(#)

...or

2) A single three-dimensional array:

ABC(3, #)

...where

ABC(1, #) = A(#)

ABC(2, #) = B(#)

ABC(3, #) = C(#)

So that these two statements would be equivalent:

If A(123) = 10 and B(123) = 5.41 and C(123) = 1000 then

If ABC(1, 123) = 10 and ABC(2, 123) = 5.41 and C(3, 123) = 1000 then

The data are all related and will always be dimensioned to the same index.

I don't care about the look of the resulting coding, I'm curious which will execute faster when compiled.

???

Many thanks,

--Tom

## Comment