location.href vs location.assign (v4)

Revision 4 of this benchmark created by Mike McCaughan on


Preparation HTML

<iframe id="test" src="about:blank"></iframe>

Setup

var frame = document.getElementById('test').contentWindow;

Teardown



            document.getElementById('test').contentWindow.location.href = "about:blank";
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
location.href
frame.location.href = 'javascript:example=1';
ready
location.assign
frame.location.assign('javascript:example=1');
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.