further optimize XS.extend()