Re: [v8-users] Digest for v8-users@googlegroups.com - 7 Messages in 2 Topics

9 views
Skip to first unread message

ahta trading

unread,
Nov 8, 2012, 12:07:36 AM11/8/12
to v8-u...@googlegroups.com

Group: http://groups.google.com/group/v8-users/topics

    Vyacheslav Egorov <veg...@chromium.org> Nov 06 08:04AM -0800  

    Hi Kevin,
     
    Does it deoptimize?
     
    I do not see any deoptimizations in the log you have attached, were
    you running with --trace-deopt?
     
    Vyacheslav Egorov
     
     

     

    Kevin Gadd <kevin...@gmail.com> Nov 06 04:16PM -0800  

    Hi Vyacheslav,
     
    Yeah, as I said I ran with trace-opt, trace-bailout and trace-deopt turned
    on. So 'disabled optimization for' doesn't mean the function is
    deoptimized? That's really surprising to me, because I see a performance
    hit for those functions, and I assume that optimization being turned off
    would mean that the functions would have to run using unoptimized JIT
    output. That's not the case then? Does that mean that this error message
    doesn't matter, and it's intended that these functions keep getting
    recompiled until they hit the limit?
     
    It would be cool to know how to find out why the functions keep getting
    marked for recompilation, since the compiles seem to be taking time, but I
    guess that's less of an issue.
     
    Thanks,
    -kg
     
     
     
    --
    -kg

     

    Wyatt <deltaba...@gmail.com> Nov 06 12:27PM -0800  

    With the follow code one hidden class is created:
     
    function Point(x, y) {
    this.x = x;
    this.y = y;
    }
    var p1 = new Point(11, 22);
    var p2 = new Point(33, 44);
     
    Will p2.x="aString"; change its hidden class?
     
    Will p2.x=undefined; change its hidden class?
     
    Will p3= new Point(42,"theAnswer"); create a new hidden class?
     
    I'm inclined to think that the answer is yes for each case..?
    Or at least each of these cases seems as if it could not be fully optimized.
     
    Any help is much appreciated!

     

    Vyacheslav Egorov <veg...@chromium.org> Nov 06 02:43PM -0800  

    The answer is no for each case.
     
    V8 does not track types of values assigned to a named properties.
     
    Vyacheslav Egorov
     
     

     

    Wyatt <deltaba...@gmail.com> Nov 06 03:44PM -0800  

    Interesting! But wouldn't each of these cases nullify any assumptions
    made by the type-specializing JIT?

     

    Wyatt <deltaba...@gmail.com> Nov 06 03:48PM -0800  

    Actually these cases would probably just trigger a recompilation
    (if the type-specializing JIT was invoked in the first place).
     
    I shall now go re-read your last five blog posts.

     

    Vyacheslav Egorov <veg...@chromium.org> Nov 06 03:57PM -0800  

    In V8 currently most assumptions are made and checked at uses, not at
    definitions.
     
    Consider for example:
     
    var p = new Point(1, 2);
     
    function add(p) {
    return p.x + p.y
    }
     
    add(p);
     
    Here the fact that p.x and p.y is numbers is checked at the +
    operation. If add is optimized for these assumptions and you pass
    point that contains strings in x and y then function add will
    deoptimize. But this will happen when you execute add not when you
    create point with string values in x and y.
    Vyacheslav Egorov
     
     

     

You received this message because you are subscribed to the Google Group v8-users.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
ASF-8718.pdf
CellNotify_001.jpg
20_bookmark_video.bmk
Reply all
Reply to author
Forward
0 new messages