Hi,

I stumbled across a very strange problem. I'm using 3.12.19.1 on Linux 
64-bit.

I have an object implemented in C++, I noticed an unexpected slow-down and 
eventually traced it to a particular call.

If the object method is called like this:

this.MyObject.method() 


it takes 20ms (milliseconds) to execute, when it should be 0ms. I made 
timings inside C++ and they show a total 0ms execution time so the 20ms is 
introduced inside the JS<->C++ boundary.

On a hunch I tried this:

var cn= this.MyObject.method;

 

cn(); 


and guess what, it takes 0ms!! 

methods of the *same* Object instance are called before and after yet they 
execute as expected with no measurable overhead (in millsecond land). 

Is there any foundation for such a problem? Could it be a scoping/resolving 
issue causing problems resolving the method?

Are there any diagnostics that could help here?

Thanks,

Stuart.

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to