Roughly speaking, what’s the performance of .net code that reads/deletes keys from the Windows registry? Is it akin to file i/o? faster? closer to memory i/o? slower? closer to network i/o? (i can’t imagine…just stated for completeness =)
Roughly speaking, what’s the performance of .net code that reads/deletes keys from the Windows
Share
You can’t even start to compare network i/o with local file i/o / registry access because there are so many more factors at work.
You could in theory devise some sort of test to compare file reads with registry reads, but I don’t think it will be of any benefit. This test could still be flawed because it may depend on which keys you are reading from and other apps that may also be reading the registry in the background.
If you need to access the registry then the time it takes is largely irrelevant because you have no option but to do it anyway – likewise with file i/o.
EDIT:
Quick Test gives the following results:
100,000 registry reads takes 1.81 – 1.89 s
100,000 reads of a 9 byte file takes 19.80 – 20.10 s (so registry is much (~10x) faster:)