We use country panel data spanning over 1998-2008 for both developed and developing countries to study the productivity growth when countries are close to the technology frontier. Relying on a semi-parametric generalized additive model, we estimate both reduced and structural forms for total factor productivity growth. We consider three measurements of frontier: the economy with the highest level of productivity growth, the world productivity growth and the productivity growth of the USA. We obtain a U-shape relation between productivity growth and the proximity to the world productivity growth. The relation between productivity growth and human capital displays an inverted U-shape form (res. U-shape) when the proximity to the highest productivity growth is used (res. the proximity to productivity growth of the USA). Total staff in R&D has an inverted W-shape effect on productivity growth. The share of R&D expenditure funded by government and from abroad impact positively the growth of productivity. However, the increase in government spending on R&D has a greater impact on productivity growth when the former is weak, and a smaller impact when R&D spending is already high. International trade has a positive effect on productivity growth. Specification tests show that our semi-parametric models provide a better approximation of the data compared to the parametric analogue, revealing a high degree of nonlinearity governing productivity growth.