The second step, which is usually the fastest, may be accelerated in the following way: Firstly, the Gröbner basis is replaced by the list of its leading monomials (this is already done for the computation of the Hilbert series). Then each monomial like formula_12 is replaced by the product of the variables in it: formula_13 Then the dimension is the maximal size of a subset "S" of the variables, such that none of these products of variables depends only on the variables in "S".