regEx vs split

Benchmark created by Gorzas on


Setup

var date = '19/02/1987';

Test runner

Ready to run.

Testing in
TestOps/sec
regEx
var regEx = /(\d+)\/(\d+)\/(\d+)/;

date.match(regEx);
ready
Split
date.split('/');
ready

Revisions

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