Synonymous mutations do not alter the protein produced yet can have a significant effect on protein levels. The mechanisms by which this effect is achieved are controversial; although some previous studies have suggested that codon bias is the most important determinant of translation efficiency, a recent study suggested that mRNA folding at the beginning of genes is the dominant factor via its effect on translation initiation. Using the Escherichia coli and Saccharomyces cerevisiae transcriptomes, we conducted a genome-scale study aiming at dissecting the determinants of translation efficiency. There is a significant association between codon bias and translation efficiency across all endogenous genes in E. coli and S. cerevisiae but no association between folding energy and translation efficiency, demonstrating the role of codon bias as an important determinant of translation efficiency. However, folding energy does modulate the strength of association between codon bias and translation efficiency, which is maximized at very weak mRNA folding (i.e., high folding energy) levels. We find a strong correlation between the genomic profiles of ribosomal density and genomic profiles of folding energy across mRNA, suggesting that lower folding energies slow down the ribosomes and decrease translation efficiency. Accordingly, we find that selection forces act near uniformly to decrease the folding energy at the beginning of genes. In summary, these findings testify that in endogenous genes, folding energy affects translation efficiency in a global manner that is not related to the expression levels of individual genes, and thus cannot be detected by correlation with their expression levels.