We compared the performance and the computational complexity of a time-domain- (TD-) artificial neural network (ANN) and a frequency-domain- (FD-) ANN used for nonlinearity compensation in optical fiber communication systems. In optical communication systems, ANNs have been used for coherent optical orthogonal frequency division multiplexing (CO-OFDM) transmißion systems in the frequency domain. TD-ANN-based optical nonlinearity compensation has also been investigated in the last few years. For linear equalization to compensate for, e.g., chromatic dispersion (CD), it is known that FD-equalization outperforms TD-equalization in terms of computational complexity over a wide range of CD values. However, TD-ANNs and FD-ANNs have not been investigated in order to compare them in terms of computational complexity, to the best of our knowledge. In this paper, we investigated and compared the computational complexity of a TD-ANN and an FD-ANN which are used for optical nonlinearity compensation. We evaluated the number of complex multiplications needed for nonlinear compensation per symbol. The compensation performance was investigated using 16-ary quadrature amplitude modulation (16QAM) signal transmißion over a standard single-mode fiber (ßMF) by numerical simulation. The results showed that the TD-ANN outperformed the FD-ANN in terms of computational complexity.