Compounding processes, also known as perpetuities, play an important role in many applications; in particular, in time series analysis and mathematical finance. Apart from some special cases, the distribution of a perpetuity is hard to compute, and large deviations estimates sometimes involve complicated constants which depend on the complete distribution. Motivated by this, we propose provably efficient importance sampling algorithms which apply to qualitatively different cases, leading to light and heavy tails. Both algorithms have the non-standard feature of being statedependent. In addition, in order to verify the efficiency, we apply recently developed techniques based on Lyapunov inequalities.