[patch] Reduce memory usage of ComputeEditDistance() by (almost) 50%

Nico Weber thakis at chromium.org
Mon Jul 13 14:33:52 PDT 2015


On Mon, Jul 13, 2015 at 1:42 PM, Douglas Gregor <dgregor at apple.com> wrote:

>
> > On Jul 13, 2015, at 12:39 PM, Nico Weber <thakis at chromium.org> wrote:
> >
> > Hi,
> >
> > ComputeEditDistance() currently keeps two rows of the edit distance
> matrix in memory. That's unnecessary, one row plus one additional element
> are sufficient. With this patch, strings up to 64 chars can be processed
> without going to the heap, compared to 32 chars previously. (But the main
> motivation is that the code gets a bit simpler.)
>
> Ah, good call. LGTM
>

 r242069, thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150713/daad904a/attachment.html>


More information about the llvm-commits mailing list