On Friday, 11 May 2012 at 13:28:21 UTC, deadalnix wrote:
Le 11/05/2012 15:01, Roman D. Boiko a écrit :
The problem with placing it in Token is that Token should not know
anything about source as a whole.

I don't really see the benefit of this. You are trading a O(1) operation to an O(log(n)) . It can only be faster in specific cases, which should be measured.
It would be interesting to see benchmarks. But anyway log(1M) is just 20, and I didn't see any source code with 1M lines :). The main point is design, not performance. I'm trying to build minimal design that handles common use cases very well, and others well enough. I don't see why Location would be needed for every Token.

It is likely to be slower on compiling erroneous code or used for something else than compiling, and likely to be insignificant to compile correct code (I suspect the performance win is negligible compared to the time required to build a fully operational executable).
IMO, it is unrelated.
You are overcomplicating things for no to little benefice.
Well, it depends... However, I will provide design rationale document this month.

Reply via email to