benchmark add utils
This commit is contained in:
parent
ddad219e7a
commit
eaefe9a272
9
benchmark/utils.js
Normal file
9
benchmark/utils.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { hexToBytes } from '../abstract/utils.js';
|
||||
import { run, mark } from 'micro-bmark';
|
||||
|
||||
run(async () => {
|
||||
const hex32 = '0123456789abcdef'.repeat(4);
|
||||
const hex256 = hex32.repeat(8);
|
||||
await mark('hexToBytes 32b', 5000000, () => hexToBytes(hex32));
|
||||
await mark('hexToBytes 256b', 500000, () => hexToBytes(hex256));
|
||||
});
|
Loading…
Reference in New Issue
Block a user