• rafaelw@chromium.org's avatar
    Minor Object.observe optimizations · 902a0592
    rafaelw@chromium.org authored
    This patch includes the follow two minor optimizations:
    
    1) When Object.unobserve-ing, instead of deleting from changeObservers, set the index position to null, and null-check when iterating elsewhere
    2) Isolate creation of null-proto objects inside a utility function
    
    These former (deleting) was clearly showing up in d8 --prof traces and the later was preventing optimization of containing functions because of non-standard literal. Combined, on MDV construction/teardown benchmark, saves about 10%.
    
    Note that this patch also cleans up retrieving objectInfo inside a utility function.
    
    R=rossberg@chromium.org, rossberg
    BUG=
    
    Review URL: https://codereview.chromium.org/123523002
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    902a0592
object-observe.js 19.1 KB