[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Bug in lisp indentation
From: |
Stefan Monnier |
Subject: |
Re: Fwd: Bug in lisp indentation |
Date: |
Tue, 17 Jul 2007 13:00:57 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> Parsing arbitrarily far backward for every line is always going to
> make for quadratic behavior.
Actually, that's not necessarily the case.
I've done some tests with my sml-mode (which requires a fairly costly
indentation algorithm) and while any particular line-indent does have
a worst case cost of about O(n), the worst case cost for "reasonable code"
when applied to a region was still O(n). I.e. most lines take O(1), and
only O(1/n) lines take O(n) time.
Stefan
- Re: Bug in lisp indentation, (continued)
Re: Bug in lisp indentation, Thien-Thi Nguyen, 2007/07/14
Re: Fwd: Bug in lisp indentation, Stefan Monnier, 2007/07/15