source: frontend/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 819 bytes
RevLine 
[9af201e]1import { Bench } from 'tinybench'
2import { stringArrayToHexStripped } from '../lib/utils.js'
3
4const benchStringArrayToHexStripped = new Bench({ name: 'stringArrayToHexStripped' })
5
6const case1 = ['0', '0', '0', '0']
7const case2 = ['0', '0', '0', '1']
8const case3 = ['0', '0', '1', '0']
9const case4 = ['0', '1', '0', '0']
10const case5 = ['1', '0', '0', '0']
11const case6 = ['1', '0', '0', '1']
12
13benchStringArrayToHexStripped.add('stringArrayToHexStripped', function () {
14 stringArrayToHexStripped(case1)
15 stringArrayToHexStripped(case2)
16 stringArrayToHexStripped(case3)
17 stringArrayToHexStripped(case4)
18 stringArrayToHexStripped(case5)
19 stringArrayToHexStripped(case6)
20})
21
22await benchStringArrayToHexStripped.run()
23console.log(benchStringArrayToHexStripped.name)
24console.table(benchStringArrayToHexStripped.table())
Note: See TracBrowser for help on using the repository browser.