[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A little compression...



On 2008-05-25, Harry Potter <maspethrose7@aol.com> wrote:
> These functions *must* be called alot, because they are called at
> nearly every position in the input file.

Then you are doing it wrong. :-)

Changing the algorithm gets you a speedup, not writing it in assembler.
Search for "string matching" and start reading. You just can't get
any significant speedups to your brute-force matching method.

One starting position is: http://www.iki.fi/a1bert/Dev/pucrunch/ .
I got a 70x speedup by improving the algorithm, not the code.

-Pasi
-- 
"She could go hours without thinking about that boy, when she set her mind
 to it. And though it was harder now, knowing he was about to set his foot on
 the road toward her that very morning, she still put thoughts of him aside."
	-- Peggy about Alvin in "Prentice Alvin"