The gamma-evaluation method is a tool by which dose distributions can be compared in a quantitative manner combining dose-difference and distance-to-agreement criteria. Since its introduction, the gamma evaluation has been used in many studies and is on the verge of becoming the preferred dose distribution comparison method, particularly for intensity-modulated radiation therapy (IMRT) verification. One major disadvantage, however, is its long computation time, which especially applies to the comparison of three-dimensional (3D) dose distributions. We present a fast algorithm for a full 3D gamma evaluation at high resolution. Both the reference and evaluated dose distributions are first resampled on the same grid. For each point of the reference dose distribution, the algorithm searches for the best point of agreement according to the gamma method in the evaluated dose distribution, which can be done at a subvoxel resolution. Speed, computer memory efficiency, and high spatial resolution are achieved by searching around each reference point with increasing distance in a sphere, which has a radius of a chosen maximum search distance and is interpolated "on-the-fly" at a chosen sample step size. The smaller the sample step size and the larger the differences between the dose distributions, the longer the gamma evaluation takes. With decreasing sample step size, statistical measures of the 3D gamma distribution converge. Two clinical examples were investigated using 3% of the prescribed dose as dose-difference and 0.3 cm as distance-to-agreement criteria. For 0.2 cm grid spacing, the change in gamma indices was negligible below a sample step size of 0.02 cm. Comparing the full 3D gamma evaluation and slice-by-slice 2D gamma evaluations ("2.5D") for these clinical examples, the gamma indices improved by searching in full 3D space, with the average gamma index decreasing by at least 8%.