Optimize split implementation