Typically, memory comes in 2 GB, 4 GB, 8 GB, etc.; and it seems to be a bad idea to combine different memory sizes (like a 4 GB stick and a 2 GB stick to have 6 GB), but that is - if true - related to hardware details and architectures.
My question is, does it affect the speed of a Virtual Machine if I choose odd memory sizes? And that includes not only 6 GB, but also 6.1234567 GB or whatever strange number.
Assuming the memory size is not small enough to effect performance, will it be any difference to give it 7.875 versus 8.000 GB, etc.? Do I need to avoid such numbers?
Edit: I care about Windows 10 Pro 64 bit, if the answer would be OS specific.
Odd memory sizes do not affect performance.
The reason it's generally considered a bad idea to mix RAM sticks in a physical computer has nothing to do with the size of the memory space, but the different timings you will likely get when installing mismatched modules. It's possible to buy different-sized modules with the exact same timings, and it's also possible to buy same-sized modules with different timings. The effects on performance will be the same in either case. None of those issues, however, apply to virtual machines.
The MMU (Memory Management Unit) in all modern CPUs divides memory into "pages", which you can think of like the blocks on a hard drive. The de-facto standard page size in all modern computers is 4KB. So even if you have a very odd amount of RAM allocated to a VM (7.875GB in your example), the system is only ever concerning itself with 4KB of memory at a time anyway. It's not possible to allocate an amount of memory to a VM that is not a multiple of 4KB. Even if you could, the host would prevent it, since it's not possible for the MMU to allocate a fraction of a page.
The computational cost of loading/saving any page is the same (as far as Windows is concerned) whether the machine is virtual or not. The physical (time) cost of access to a page may be different on a page-by-page basis, but that's due to the host's hardware, not the VM. Functionally, all pages are exactly the same.
So no, an odd memory size in and of itself will not impact performance, either in a VM or a physical computer.