Question: I had a PC with two OSs installed, which hard drive I erased using Disks from UbuntuUSB. I chose quick erase. As I understand, it deleted partition table, but all files’ ones and zeroes are still on the HDD. I then created new partition table, and installed Win10.

Question: would the HDD work (read/write) faster now, if I overwrote it with zeroes?Or: is writing information onto zero-overwritten HDD faster than on a “dirty” HDD?

Answer: Hard drives do not store the literal zeroes and ones that I suspect that you think they do. Instead, they store the data in an encoded format that guarantees that there won’t be too many zero bits or one bits next to each other. A long run of zeroes or ones could actually cause synchronization issues when trying to read the data because of minuscule variations in platter speed, vibrations, etc of the physical medium on which the data is encoded to, so it’s limited to a certain tolerance.

In addition, hard drives always encode an entire sector (typically 512 bytes or 4096 bytes of data) at once, not just the bits that have changed (again, because it’s encoded data). This ensures that the entire sector is correctly encoded every time. So, filling the drive with all zeroes has no practical benefit, although it doesn’t harm anything either, other than the minor mechanical wear caused by doing so. You can choose to overwrite everything with zeroes if you want to, but it will have no performance benefit, and you’ll simply waste your time waiting for all those zeroes to be written.

Solid state drives go through a similar process; they automatically erase the previous contents of a block before writing a new block of data, so writing all zeroes to a SSD would cause unnecessary wear on the device, as flash technology can only be erased a variable, but finite, number of times before failure. The wear introduced would only be something like 0.01% of the total duty cycles, but it’s something that you would want to avoid doing on a regular basis.