To improve the computational efficiency for the solution of the 3D Helmholtz equation in the frequency-space domain, high-order compact forms of finite differences are preferred. We applied a pointwise Padé approximation to develop a 3D 27-point fourth-order compact finite-difference (FD) stencil in the grid interior, with a space-differentiated source term, for the scalar-wave equation; this has similar high-accuracy (4–5 grid points per the shortest wavelength) to another 27-point fourth-order FD stencil using a parsimonious mixed-grid and staggered-grid combination, but is much simpler. For absorbing boundary conditions (ABCs), a damping zone is expensive, and a perfectly matched layer can not be straightforwardly introduced into the compact FD form for the second-order wave equation. Thus, we developed 3D one-way wave equation (OWWE) ABCs with adjustable coefficients. They have different angle approximations and FD forms for the six faces, twelve edges, and eight corners in 3D models to fit with the interior compact FD form. By adjusting the coefficients to the optimum, the OWWE ABCs have wider-angle absorbing ability than those without optimal coefficients. Finally, all the interior and boundary FD forms were combined into a sparse complex-valued impedance matrix of the frequency-space modeling equation, and solved for each frequency. Because the storage of the sparse impedance matrix was determined by the 3D discrete grid size, the OWWE ABCs with only one outer layer needed the minimum grid size compared with other ABCs, thus were the most efficient for the solution of the impedance matrix. The modeling algorithm was performed on multicore processors using a MPI parallel direct solver. Numerical tests on homogeneous and heterogeneous models gave satisfactory absorbing effects.