We reformulate the original component-by-component algorithm for rank-1 lattices in a matrix-vector notation as to highlight its structural properties. For function spaces similar to a weighted Korobov space, we derive a technique which has construction cost O(s n log(n)), in contrast with the original algorithm which has construction cost O(s n^2). Herein s is the number of dimensions and n the number of points (taken prime). In contrast to other approaches to speed up construction, our fast algorithm computes exactly the same as the original algorithm. The presented algorithm can also be used to construct randomly shifted lattice rules in weighted Sobolev spaces.