A vectorized Monte Carlo computer code has been developed for modeling
photon transport in single photon emission computed tomography (SPECT
). The code models photon transport in a uniform attenuating region an
d photon detection by a gamma camera. It is adapted from a history-bas
ed Monte Carlo code in which photon history data are stored in scalar
variables and photon histories are computed sequentially. The vectoriz
ed code is written in FORTRAN77 and uses an event-based algorithm in w
hich photon history data are stored in arrays and photon history compu
tations are performed within DO loops. The indices of the DO loops ran
ge over the number of photon histories, and these loops may take advan
tage of the vector processing unit of our Stellar GS1000 computer for
pipelined computations. Without the use of the vector processor the ev
ent-based code is faster than the history-based code because of numeri
cal optimization performed during conversion to the event-based algori
thm. When only the detection of unscattered photons is modeled, the ev
ent-based code executes 5.1 times faster with the use of the vector pr
ocessor than without; when the detection of scattered and unscattered
photons is modeled the speed increase is a factor of 2.9. Vectorizatio
n is a valuable way to increase the performance of Monte Carlo code fo
r modeling photon transport in SPECT.