Raphael Geissert wrote: > Russ Allbery wrote: > [...] >> >> Have you benchmarked this? My intuition says that if this makes any >> difference at all, it will be a performance *degredation*. You're now >> walking the entire text for every typo we know about instead of doing an >> O(1) hash table lookup for each word. It's converting an O(n) check into >> an O(n^2) check. >>
I'm not sure it is O(n^2), why would it be? Anyway, I've been thinking about other ways to optimise it without relying on the kind of text passed when it is large. Will benchmark the three ways, this time by benchmarking Spelling.pm directly, and without doing tricks like using the modified version of lintian that does binary spell checking. Cheers, -- Raphael Geissert - Debian Maintainer www.debian.org - get.debian.net -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org