Small optimization with stack buffer.