When updating packed-refs, write_with_updates() iterates over all refs and routes every write through write_packed_entry(), which uses fprintf(). Karthik Nayak's patch tracks the position of unchanged refs in the snapshot iterator and copies them directly with fwrite(). He reports a consistent drop of about 20% when deleting from packed references.
The revised commit message notes that any sanitization that happened as a side effect of reformatting is now lost, and argues that this was never the job of that code. Junio C Hamano pointed out a spelling slip, "sanitation" for "sanitization".
Patrick Steinhardt's review was mainly about the new record_start field. He said the comment suggested pos equals record_start, but pos is sometimes advanced without updating it, so the comment was inaccurate. He suggested the commit message state the problem with the status quo before the solution, and called a small wrapper around fwrite(3) somewhat pointless. Karthik agreed to amend and inline it. Toon Claes also reviewed, and Karthik adopted one of his suggestions.
Karthik posted a new version after the comment on the field was sorted out.