We introduce a general and computationally efficient approach to 3-D localization microscopy. The main idea is to construct a continuous-domain representation of the PSF by expanding it in a polynomial B-spline basis. This allows us to fit the PSF to the data with sub-pixel accuracy. Since the basis functions are compactly supported, the evaluation of the PSF is computationally efficient. Furthermore, our approach can accommodate for any 3-D PSF design, and it does not require a calibration curve for the axial position. We further introduce a computationally efficient implementation of the least-squares criterion and demonstrate its potential use for fast and accurate reconstruction of super-resolution data.