Monday, December 12, 2011

Looking at Ammo pt4

Just to make sure that NumberDictionaryShape was the problem, I looked inside V8 to see how it classifies the functions.  Inside the src folder in object.h, I discovered V8's object implementation.

The function that takes the most process time comes to mind. v8::internal::HashTable<v8::internal::NumberDictionaryShape, unsigned int>::FindEntry(v8::internal::Isolate*, unsigned int)





























One of the comments say this:
  // In the slow mode the elements is either a NumberDictionary, an
  // ExternalArray, or a FixedArray parameter map for a (non-strict)
  // arguments object. 


Chrome says to avoid dictionary objects, and ammo.js definitely uses them. 

1 comment:

  1. Good to know. The problem is there is not a lot to choose from if you are trying to develop in WebGL :(

    ReplyDelete