optimize string impl for node