1. A method for optimising compiler-generated program code intended for a portable data carrier having a processor core and a first and second memory area, comprising: the first memory area being provided to receive the optimised program code, the second memory area being provided to receive a predefined library having a multiplicity of library code fragments, and the compiler-generated program code being searched for program code fragments which correspond, at least in respect of their effect, to respectively one library code fragment, the program code fragments found thereby being replaced by respectively one call of the corresponding library code fragment.