[Webkit-unassigned] [Bug 157297] New: Web Inspector: console.assert should do far less work when the assertion is true

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 2 20:50:36 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157297

            Bug ID: 157297
           Summary: Web Inspector: console.assert should do far less work
                    when the assertion is true
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: bburg at apple.com, graouts at webkit.org,
                    joepeck at webkit.org, keith_miller at apple.com,
                    mark.lam at apple.com, mattbaker at apple.com,
                    nvasilyev at apple.com, sbarati at apple.com,
                    timothy at apple.com, webkit-bug-importer at group.apple.com

* SUMMARY
console.assert should do far less work when the assertion is true.

* TEST
<script>
(function() {    
    function bench(name, f, arg) {
        var warmup = f();
        var start = Date.now();
        var result = f();
        var end = Date.now();
        console.log(name, (end-start)+"ms");
    }

    bench("console.assert...", function() {
        for (var i = 0; i < 1e6; ++i)
            console.assert(true, "message");
    });
})();
</script>

* RESULTS
• Safari - console.assert... – "119ms"
• Chrome - console.assert... 22ms
• Firefox - console.assert... 44ms

We do a lot of work in the case where the assert doesn't fire. After a quick fix:
• Safari - console.assert... – "9ms"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160503/523ba751/attachment.html>


More information about the webkit-unassigned mailing list