refactor write. don't run unnecessary alloc
refactor write. don't run unnecessary alloc

leavesbnw/picrin,koba-e964/picrin,dcurrie/picrin,omasanori/picrin,koba-e964/picrin,dcurrie/picrin,ktakashi/picrin,picrin-scheme/picrin,leavesbnw/picrin,ktakashi/picrin,koba-e964/picrin,leavesbnw/picrin,ktakashi/picrin,omasanori/picrin,picrin-scheme/picrin