Single string optimization