One of the most important sets associated with a poset P is its set of linear extensions, E(P). In this paper, we present an algorithm to generate all of the linear extensions of a poset in constant amortized time; that is, in time O(e(P)), where e(P) = jE(P)j. The fastest previously known algorithm for generating the linear extensions of a poset runs in time O(n e(P)), where n is the number of elements of the poset. Our algorithm is the rst constant amortized time algorithm for generating a \naturally de ned" class of combinatorial objects for which the corresponding counting problem is #P-complete. Furthermore, we show that linear extensions can be generated in constant amortized time where each extension di ers from its predecessor by one or two adjacent transpositions. The algorithm is practical and can be modi ed to e ciently count linear extensions, and to compute P (x < y), for all pairs x; y, in time O(n 2 + e(P)).