Re: Idea for ECMA/C# Standard - compile time hash for performance



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.)
>
>
.



Relevant Pages

  • Re: Matching times and classes
    ... Microsoft Excel MVP ... Did you enter the formula as an array? ... time *and* if the end time is greater than or equal to the lookup time. ... Enter this array formula** in Daily Sch B2: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Matching times and classes
    ... Did you enter the formula as an array? ... type in a regular formula you hit the ENTER key. ... time *and* if the end time is greater than or equal to the lookup time. ... Enter this array formula** in Daily Sch B2: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Quicker finding strings? Alternative for array, hash, set?
    ... I have to find values in a list of some 40,000 strings. ... these in an array is not likely to be the quickest way.... ... If you are only concerned with lookup time, a hash has amortized O ...
    (comp.lang.ruby)
  • Re: Matching times and classes
    ... Did you enter the formula as an array? ... type in a regular formula you hit the ENTER key. ... time *and* if the end time is greater than or equal to the lookup time. ... Enter this array formula** in Daily Sch B2: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Idea for ECMA/C# Standard - compile time hash for performance
    ... more, why not just use an array directly, even if it's a sparse array? ... that matter) to save such a small amount of memory. ... (The hash table ...
    (microsoft.public.dotnet.languages.csharp)