@@ -4,10 +4,22 @@ const { readFileSync } = require('fs')
44const { timeAndReport } = require ( '../../../lib/time' )
55const solutions = require ( './is-pal.repo' )
66
7- const bigPalPath = join ( __dirname , '/big-palindrome.txt' )
7+ const smallPalPath = join ( __dirname , 'palindrome-small.txt' )
8+ const bigPalPath = join ( __dirname , '/palindrome-big.txt' )
9+
10+ const emptyPalindrome = ''
11+ const smallPalindrome = readFileSync ( smallPalPath , 'utf-8' )
812const bigPalindrome = readFileSync ( bigPalPath , 'utf-8' )
913
10- const args = [ bigPalindrome ]
11- const runs = 10_000
14+ const emptyArgs = [ emptyPalindrome ]
15+ const emptyRuns = 1_000_000
16+
17+ const smallArgs = [ smallPalindrome ]
18+ const smallRuns = 100_000
19+
20+ const bigArgs = [ bigPalindrome ]
21+ const bigRuns = 10_000
1222
13- timeAndReport ( solutions , args , runs , 'Is palindrome?' )
23+ timeAndReport ( solutions , emptyArgs , emptyRuns , 'is-palindrome (empty)' )
24+ timeAndReport ( solutions , smallArgs , smallRuns , 'is-palindrome (small)' )
25+ timeAndReport ( solutions , bigArgs , bigRuns , 'is-palindrome (big)' )
0 commit comments