On Tuesday, February 18, 2014 4:10:35 AM UTC-6, Edward K. Ream wrote:

> My goal/fantasy​ is to be able to eliminate perfect import checks, or 
perhaps greatly speed them.

I fixed two JavaScript bugs today.  In the process I discovered that the 
import code tokenizes code, and that this tokenizing code is (usually) used 
in the perfect import checks.  It looks like the existing tokenizing checks 
can solve several problems:

1. Scanning for tokens can often use s.find for maximum speed.

2. Ignoring (or simply never creating) tokens for whitespace and newlines 
instantly makes compares more forgiving.  Obviously, we can't ignore 
whitespace in Python, but Python is probably the only language in which 
whitespace (outside of strings, that is) is important.

3. Always using tokenizing compares might eliminate quite a bit of 
comparison code that has accumulated (like barnacles) over time.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to