Re: Idea for ECMA/C# Standard - compile time hash for performance
- From: WXS <WXS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Apr 2005 06:17:06 -0700
The example I gave was just that an example and the reality is those enums
can be almost anything in an integer range so sparse array really isn't an
answer, especially allocating the whole array. And if done as a lookup tree
hash or map requires that lookup time, which in the financial industry I work
in with thousands of market data messages (with lots of data in each), or
more comming in, it is becoming less and less viable by the day (although
increasing processor speeds help mitigate a bit - when a customer is willing
to upgrade).
The key is I don't want to burn a huge amount of memory and I want to incur
the minimal amount of lookup time possible. In this case the only way to
handle this is with a language change I believe. Because having the compiler
do the mapping at compile time saves me from burning huge memory and
virtually any lookup time at run time.
Thanks,
Dave
"Bruce Wood" wrote:
> If your original enum type does not have values up into four digits or
> more, why not just use an array directly, even if it's a sparse array?
> What difference does it make, on a machine with 500 MB of memory, if
> you waste 80 entries in an array of 100?
>
> It seems hardly worth a change to the language (or a hash table for
> that matter) to save such a small amount of memory. (The hash table
> would probably consume as much overhead as that anyway.)
>
>
.
- Follow-Ups:
- References:
- Prev by Date: Re: textbox blank
- Next by Date: Re: many for cycles
- Previous by thread: Re: Idea for ECMA/C# Standard - compile time hash for performance
- Next by thread: Re: Idea for ECMA/C# Standard - compile time hash for performance
- Index(es):
Relevant Pages
|