Re: Help to optimize palindrome search from input file

2010-10-15 Thread siddarth shankar
i could get it down to around 1.6/1.7 seconds s...@sid-:~$ time clojure dummy.clj woohoo palindrome: eve woohoo palindrome: ranynar real0m1.739s user0m2.088s sys 0m0.124s made a couple of changes - only call 'palindrome?' for substrings between identical characters(between

Re: Help to optimize palindrome search from input file

2010-10-19 Thread siddarth shankar
tring): real3m0.351s user3m1.299s sys 0m1.008s largest palindrome: amanaplanaracecaranalpanama On Oct 15, 1:22 pm, siddarth shankar wrote: > i could get it down to around 1.6/1.7 seconds > > s...@sid-:~$ time clojure dummy.clj > woohoo palindrome:  eve > woohoo

Re: Help to optimize palindrome search from input file

2010-10-22 Thread siddarth shankar
very nice! faster and more succinct :) also means we can read in smaller chunks from large strings as required.. On Oct 21, 4:15 am, Kent wrote: > I took a different approach, not wildly "clojurish", type-hinted, > ugly, but also pretty fast.  About 1.2ms on my machine (after about 10 > runs so t