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



In the example scenario the hash would be an integer value so it is a pretty
quick hash but still a hash none the less. We could optimize the hash
possibly but even that likely would not match an array lookup.

We have to be careful about our scaling as the software can be used on
clients or servers for what we are building, some clients have multiple
cpu's. In this scenario example we can't take advantage of parallelism for
updating the one particular object as that is a discrete message that needs
to be processed in order. We do take advantage of parallelism by having
different data feeds process on different threads but our net data rate and
CPU utilization is still the same on a single CPU box. On a multi-cpu it
helps but having to do those hashes and lookups are still pretty costly which
an array lookup could avoid.



"Bruce Wood" wrote:

> Two reactions.
>
> First, what is the nature of the keys you're using for lookup? Account
> numbers? Something else? You may be able to design a better data
> structure than a generic hash table to improve your speed.
>
> Second, can you take advantage of multithreading and parallelism, and
> in so doing move to a multi-CPU box and take advantage of those
> multiple CPUs? Of course, it all depends upon the nature of your
> problem: some problems don't scale well to parallel computing; others
> do.
>
>
.



Relevant Pages

  • Re: md5 collisions and speeding tickets
    ... knowing next-to-nothing about hash funcitons or PostScript would then ... forge, according to the "experts" in sci.crypt. ... The MD5 hash for the above challenge is: ... My bet is on scenario 3, followed by scenario 1, followed by scenario ...
    (sci.crypt)
  • Re: DBI insert vs update question
    ... > only a single field difference for an already existing record). ... Sweep the pre-existing table into a hash, ... > connection be an INSERT for nonexisting records and the third connection ... > stop fitting in memory at some point of time if I go with scenario 1 ...
    (perl.beginners)
  • DBI insert vs update question
    ... only a single field difference for an already existing record). ... Sweep the pre-existing table into a hash, ... connection be an INSERT for nonexisting records and the third connection ... stop fitting in memory at some point of time if I go with scenario 1 ...
    (perl.beginners)
  • Re: Idea for ECMA/C# Standard - compile time hash for performance
    ... They are probably set once hash lookup to set ... Given that if we could do the array lookup in that case ... > I'm assuming that the hash table is established once (at compile time) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: to sig or not to sig?
    ... > The bit I was wondering about is this sort of scenario: ... > - someone has digitally signed a piece of compiled program code to certify ... > long as the hash, is there an algorithm which they can use to put the right ... Nobody has found any two texts with the same md5 + sha hash, ...
    (comp.os.linux.misc)

Loading