After a discussion about the ridiculousness that it took Java 30 years to provide a built-in means to copy from an InputStream to an OutputStream, I looked at the 1000s of helpers everybody wrote in the mean time and everybody seems to converge on an 8KB buffer.
Why?
Why 8KB? Why not 4KB (memory page size, disk sector size)? Why not 2MB?
Does anybody know?
=> More informations about this toot | More toots from pilif@mastodon.social
@pilif this is the kind of stuff that @tef tends to have an angle on. My guess would be optimisation for throughput or leftover from spinning disks days.
=> More informations about this toot | More toots from janl@narrativ.es This content has been proxied by September (3851b).Proxy Information
text/gemini