In this article we study a classical single-item economic lot-sizing problem, where production cost functions are assumed to be piecewise linear. The lot-sizing problem is fundamental in lot-sizing research, and it is applicable to a wide range of production planning models. The intractability of the problem is related to the value of m, the number of different breakpoints of the production cost functions. When m is arbitrary, the problem is known to be NP-hard (Florian, Lenstra & Rinnooy Kan, 1980). However, if m is fixed, then it can be solved in polynomial time (Koca, Yaman & Alcturk, 2014). So far, the most efficient algorithm to solve the problem has a complexity of O(T2m+3), where T is the number of periods in the planning horizon (Koca et al., 2014). In this article we present an improved exact algorithm for solving the problem, where the complexity is reduced to O(Tm+2 center dot log T). As such it also improves upon the computational efficiency of solving some existing lot-sizing problems which are important special cases of our model. In order to achieve a more efficient implementation, our algorithm makes use of a specific data structure, named range minimum query (RMQ). (C) 2016 Elsevier B.V. All rights reserved.