jQuery vs dollar sign

Benchmark created by Tyler on


Description

A test to see if with the jQuery library, its faster to use the alias dollar sign ($) or using jQuery directly.

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Using dollar sign
$('<div>test</div>');
ready
Using jQuery
jQuery('<div>test</div>');
ready

Revisions

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

  • Revision 1: published by Tyler on
  • Revision 2: published by Eroan on