Optimize CodePieces.append()