The Gene Expression Programming(GEP) usually exists some un-expressed introns,the performance may be lower than GA in simple function optimization and the speed is un-satisfied to complicated optimization task. To improve the expression efficiency of gene space and the performance for function optimization, an evolutionary algorithm EGEP (Embedded Gene Expression Programming) was proposed based on a new decoding method. A new coding method for individual was designed which was suited for function optimization. And the expression space of individual was analyzed. Experiments showed that EGEP is superior to GA in simple function optimization. Even if the run generation reduced by 200 times, the performance of EGEP still surpasses GEP and GA in complex function optimization.