Hexadecimal to String

Benchmark created on


Setup

hex = '31666435393235332d653861622d343161662d383232382d37346638646630312d356533632d343033662d613533392d323966353963663862333530'

Test runner

Ready to run.

Testing in
TestOps/sec
with Array.map()
hex.match(/.{1,2}/g).map(byte => String.fromCharCode(parseInt(byte, 16))).join('');
ready
with Array.reduce()
hex.match(/.{1,2}/g).reduce((str, byte) => str.concat(String.fromCharCode(parseInt(byte, 16))), '')
ready

Revisions

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