Precoding is a technique that counteracts the crosstalk in downlink digital subscriber line (DSL) transmission. While linear precoding is adequate in the VDSL2 technology because of the moderate crosstalk environment, this might no longer be the case in the G.fast technology, which uses higher frequencies and therefore is affected by higher crosstalk levels. In this contribution we compare linear and nonlinear precoding for G.fast transmission protected by trellis-coded modulation, and present two bitloading algorithms that are suited for both precoding schemes. We show that for a set of measured broadband channels, each representing a binder of eight twisted-pair cables, these bitloading algorithms have substantially different complexities but yield a similar information bitrate, which is about 10% higher for nonlinear precoding as compared to linear precoding.