Re: Which one is a preferrable method storing a value in registry?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Sat, 26 May 2007 13:25:55 -0500
"Jack" <replyto@it> wrote in message
news:uXUSmi7nHHA.1216@xxxxxxxxxxxxxxxxxxxxxxx
Storing numeric value in the Windows registry:
Is it better to store it as DWORD or as a string?
What are the advantages or disadventages of doing so?
Jack
Once upon a time, we actually measured this. It was a large suite running on
a dedicated box that abused the Registry to the nth degree. (Using C++)
When comparing total clicks using an artificial test. DWords measureably
beat out strings when it comes to an insert and retrival. However, in the
real world, other factors often out-weighted the paltry differences.
For example, while first retrival of a string is a couple of clicks, due to
the way the Registry is 'cached', subsquent retrivals were just as quick as
a DWord. The particular Registry Class/Routines in use and how the Apps
performed a read and write took up most of the 'clicks'. (This is where
programmer optimization will have the greatest effect, if you are worried.)
IMHO. Don't waste much time on it. Save values in the format best used by
your program. Trust me, there are always other places in any program worthy
of more attention. <g>
-ralph
.
- References:
- Prev by Date: Re: What do I do now?
- Next by Date: How to store text inside a resource file?
- Previous by thread: Which one is a preferrable method storing a value in registry?
- Next by thread: Re: Which one is a preferrable method storing a value in registry?
- Index(es):
Relevant Pages
|