Comment #5 on issue 2245 by [email protected]: Handle<Value>() is slower than Undefined(info.GetIsolate())
http://code.google.com/p/v8/issues/detail?id=2245
I was able to reproduce the issue now. It seems to be that the branch prediction for the code snippet generated by MacroAssembler::CallApiFunctionAndReturn() is failing. In there we have special handling when the empty handle is returned. If I just switch the default case, we get the expected performance (as cen be seen for testAttr1). But that is not a workable fix, because it just isn't the default case (as can be seen for testAttr2 and testAttr3). I'll look into how this can be improved.
V8 tip of tree: testAttr1 : mean=113.20ms, min=112ms, median=113ms, max=114ms testAttr2 : mean=179.20ms, min=179ms, median=179ms, max=180ms testAttr3 : mean=103.00ms, min=102ms, median=103ms, max=104ms V8 tip of tree with switched default case: testAttr1 : mean=98.00ms, min=97ms, median=98ms, max=99ms testAttr2 : mean=206.00ms, min=206ms, median=206ms, max=206ms testAttr3 : mean=110.60ms, min=110ms, median=110ms, max=112ms -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
