jquery.trim vs string.prototype.trim (v15)

Revision 15 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
  var string = ' this is a string ';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
slice
string.slice(1,-1);
ready
trim
string.trim()
ready

Revisions

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