module Main where import Criterion.Main import Data.Algorithms.Palindromes.Palindromes import PalindromeRampion import System.IO main :: IO () main = do fn <- openFile "../../../TestSources/Bibles/engelskingjames.txt" ReadMode hSetEncoding fn latin1 input <- hGetContents fn defaultMain [bench "lengthLongestPalindrome-Eq" (nf lengthLongestPalindrome input)] {- To compare my solution and Rampion's lazy solution: [bench "lengthLongestPalindromes" (nf (palindromesAroundCentres (==) . listArrayl0) input) ,bench "Rampion's solution" (nf maximalPalindromeLengths input) ] -}