The canonical genetic code acts efficiently in minimizing the effects of mistranslations and point mutations. In the work presented we have also considered the effects of single nucleotide insertions and deletions on the optimality of the genetic code. Our results suggest that the canonical genetic code compensates for the ins/del mutations as well as mistranslations and point mutations. On the other hand, we highlighted the point that ins/del mutations have a lesser impact on the selected genes of Saccharomyces cerevisiae compared to randomly generated ones. We hypothesized that the codon usage preferences in S. cerevisiae genes are responsible for the higher efficiency of translation machinery in this organism. Our results support the conjecture that codon usage preferences render the genetic code more effective in minimizing the effects of ins/del mutations.