PERF: Optimized write_impl cases with only one slice to write.