Slice vs Substr vs Substring vs [ ] Methods

JavaScript performance comparison

Revision 55 of this test case created by Mahony Patrick

Preparation code

Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.
      
<script>
Benchmark.prototype.setup = function() {
  Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.

};

Benchmark.prototype.teardown = function() {
  Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.

};
</script>

Preparation code output

Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
[ ] (long)
Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.
pending…
charAt (long)
Hi friends, how is all, and what you want to say regarding 
this paragraph, in my view its actually amazing for me.
pending…
Substring (long)
Hi friends, how is all, and what you want to 
say regarding this paragraph, in my view its actually amazing 
for me.
pending…
Slice (long)
Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.
pending…
Substr (long)
Hi friends, how is all, and what you want to say regarding this paragraph, 
in my view its actually amazing for me.
pending…

Compare results of other browsers

Revisions

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

0 Comments

Hi friends, how is all, and what you want to say regarding this paragraph, in my view its actually amazing for me.