Do you have any statistics about what the hit rate of the identifier
lookup cache is? How many identifier lookups actually use the binary
search?

On Thu, 29 Mar 2012, Per Hedbor () @ Pike (-) developers forum wrote:

If it was not clear, before CRC32, almost 50% of share-string time was
spent in the hash function. But it was still a very small percentage
of the total CPU time used.

I optimized it because it was easy to do, mostly.

We spend significantly more time looking up identifiers in objects, as
an example, so if you want to optimize pike make this code not call so
many slow C-functions:

class foo
{
 int cnt;
 void test()
 {
    for( cnt=0; cnt<1000000; cnt++ );
 }
}

void main()
{
  foo()->test();
}
    • ... Stephen R. van den Berg
      • ... Per Hedbor () @ Pike (-) developers forum
        • ... Jonas Walld�n @ Pike developers forum
          • ... Per Hedbor () @ Pike (-) developers forum
            • ... Martin Stjernholm, Roxen IS @ Pike developers forum
  • Str... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
  • Str... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
    • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
      • ... Per Hedbor () @ Pike (-) developers forum
        • ... Per Hedbor () @ Pike (-) developers forum
          • ... Arne Goedeke
      • ... Martin Stjernholm, Roxen IS @ Pike developers forum

Reply via email to