
From: Bulat Ziganshin
Reply-To: Bulat Ziganshin To: "Branimir Maksimovic" CC: haskell-cafe@haskell.org Subject: Re[2]: [Haskell-cafe] Substring replacements Date: Fri, 23 Dec 2005 11:32:01 +0300 Hello Branimir,
Wednesday, December 21, 2005, 10:18:43 AM, you wrote:
try to add
{-# NOINLINE replace #-}
to both programs and repeat comparision
BM> These are tests: BM> No optimisations (no -O):
NOINLINE just prevents RunTimeCompilation (see wiki page for details), so this way you will test speed of "replace" on previously unknown string. disabling optimization says nothing about real speed of optimized program, which searches for the many different strings
I got it. These tests were with NOINLINE in both cases but I didn;t saw any speed difference in results as actually replace (straight) and searchReplace (KMP) is just called for two differnet strings. Perhaps if I call that for long list of short patterns patterns on short string, test would display different results (INLINE wouldn't help). I'll try that next. Greetings, Bane. _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/