From: TomSW
Subject: Re: Optimize a function for speed
Date: 
Message-ID: <72682512-75ce-4837-a154-a9afaa440f16@w9g2000yqa.googlegroups.com>
On Feb 25, 6:00 pm, Francogrex <······@grex.org> wrote:
> Hello, I have this run function but it's going really slow and I would
> like it to go much faster. I thought of hash-tables but how can we fit
> array structures into hash tables? It would be a learning experience
> for me if someone can give me a few hints on how to optimize this for
> speed. I am using SBCL. Thanks

Out of interest, what is the function supposed to do?

Also, as soon as the sP variable reaches 1, you can break out of the
inner loop because the maximum value for that iteration can be
calculated with simple maths.