[v8-users] Unstable performance in test

2013-11-14 Thread Anton Sizov
I write simple test (source at github.comhttps://gist.github.com/AntonSizov/7463876), like hello_world.cc, but the js is var f = function (x) {++x; if(x 15000) return 0;return arguments.callee(x) }; f(1) Also it executes in `for` many times - 1, one by one in single thread. stat()

Re: [v8-users] Re: Advance notice/RFC: Remove SetIndexedPropertiesToExternalArrayData and friends

2013-11-14 Thread Dmitry Lomov
Thanks a lot for your yelling :) My general remark here is if you implement your own Buffer classes and not doing what the rest of the language does, in the long run you will not be able to benefit from all optimizations we will be doing to speed up ArrayBuffers and typed arrays. I know that our

[v8-users] Re: Unstable performance in test

2013-11-14 Thread Flying Jester
That sounds like the optimizer kicking in. You can improve startup performance (or so I'm told) by keeping a copy of its script data (v8::ScriptData), which supposedly holds this information. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users ---

[v8-users] call c++ function in javascirpt can't set return value

2013-11-14 Thread Michael demiGod
*cpp:* static v8::Handlev8::Value myFunc(const v8::FunctionCallbackInfov8::Value args) { return Undefined(); } HandleObjectTemplate global_templ = ObjectTemplate::New() ; global_templ-Set(String::New(myFunc), FunctionTemplate::New(myFunc)) ; *console:* test.cc:138:80: error: invalid

Re: [v8-users] How to access a field in object

2013-11-14 Thread Steve Jonghee Yun
2. Why cast to Object**? Our objects typically contain several pointers to other objects, so FIELD_ADDR points into one object, and that location contains a pointer to the other object = Object**. The layout of the objects is described (well, actually obscured ;-) in objects.h via tons of

Re: [v8-users] How to access a field in object

2013-11-14 Thread Sven Panne
On Fri, Nov 15, 2013 at 6:58 AM, Steve Jonghee Yun yun.jong...@gmail.comwrote: Q: Are there any differences between (**reinterpret_cast*Object(F IELD_ADDR(p, offset))) and (*reinterpret_cast*Object***(FIELD_ADDR(p, offset))) ? Let's rename Object* to Foo and FIELD_ADDR(p, offset) to bar,