slice vs replace

Benchmark created on


Setup

let song = '/jingle/bells/batman/smells'

Test runner

Ready to run.

Testing in
TestOps/sec
Using split
song.slice(7)
ready
using replace
song.replace('/jingle', '')
ready

Revisions

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