In-reply-to » That FAT12 implementation is very naive and unoptimized. You can see in this video that it takes about 7 seconds to copy a ~10 kB file: https://movq.de/v/fbf2b90ce1/los86-fat12-copy.mp4 ๐Ÿฅด I kind of like that, though, because it feels a little bit like an old machine. ๐Ÿ˜…๐Ÿคช

@prologic@twtxt.net Lots, I guess. ๐Ÿ˜… The kernel keeps almost no state between syscalls, so when you want to read the next byte from a file, it has to do all the work from scratch: Locate the file in the directory and traverse the cluster chain until youโ€™ve reached the next byte. Itโ€™s easier to code this way, but obviously much slower. And the userspace program cp could read/write in multiples of 512 โ€“ it currently does not do that, intentionally, because if everything is a multiple of 512, youโ€™re less likely to discover bugs. ๐Ÿ˜…

โค‹ Read More