Concatenated Selectors

Benchmark created by adamfullen on


Description

Testing the impact of string concatenation of element id's

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<input id="foo" />

Setup

var hash = '#';
    var id = 'foo';
    var wellFormedId = '#foo';

Test runner

Ready to run.

Testing in
TestOps/sec
concat
$('#'+id);
ready
well formed
$(wellFormedId);
ready

Revisions

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

  • Revision 1: published by adamfullen on