One example of where this is used in practice is the fftw library (fastest Fourier Transform in the west). At runtime you can run a trial of FFT algorithms for your data size and architecture, and it will pick the fastest.
Compare with other databases that put an inordinate amount of effort and tuning into coming up with the one true query plan per query.