We investigate the simulation of stiff (extensible) and rigid (inextensible) semiflexible polymers in solution.In particular, we focus on polymers represented as chains of beads, interconnected by bonds with a low to zero extensibility, and significant persistence in the bond orientations along the chain, whose dynamical behavior is described by the Langevin equation. We review the derivation of the pseudopotential needed for rigid bonds. The efficiency of a number of routines for such simulations is determined. We propose a routine for handling rigid bonds which is, for longer chains, substantially more efficient than the existing ones. We also show that for extensible polymers, the Rouse modes can be exploited to achieve highly efficient simulations. At realistic values for the extensibility, e.g., that of double-stranded DNA, the simulations are orders of magnitude faster than those for rigid bonds. With increasing stiffness, however, the allowable time step and hence the efficiency decreases, until a crossover point is reached below which the routines with rigid bonds are more efficient; we present a numerical estimate of this crossover point.