On 22 Mar 2009, at 22:22, Geoffrey Sneddon wrote:

>>> calculate it on-error, and not take the cost of calculating it  
>>> normally.
>>
>> I'm not convinced it's possible to calculate it on-error, since many
>> errors happen after tokenization has already occured. I know at least
>> the Python implementation always calculates this.
>
> Would having a method that calculated it not be equally usable as it  
> is now? Remember the Python impl. has the advantage of not having to  
> deal with UTF-8 in interpreted code, which helps massively on this  
> (indeed, it is probably the right choice for the Python  
> implementation).

Also, to put numbers where my mouth is: removing the column and line- 
tracking from the normal code flow _halves_ the time taken to tokenize  
the spec.


--
Geoffrey Sneddon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to 
[email protected]
 For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to