Most compiler optimizations apply local transformations on the code, without knowing the computation expressed by the program. Despite the performance obtained, the best the solution remains to call hand-optimized libraries. Learning and using a performance is a fastidious and bug-prone task. In this thesis, we propose to deleguate this task to the compiler. Given a program, this thesis propose a compiler algorithm able to (i) recognize programs slices realizing an algorithm and to (ii) substitute a program slice by a call to a performance library whenever it is possible and profitable. Ouralgorithm is able to detect all the program slice equivalent to the seeked algorithm with respect to Herbrand equivalence, a subset of program equivalen...