Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
06:56 • Ticket [218427ffff] clock scan parser could use hash table lookups status ... artifact: cd79cf9e55 user: dgp
2000-10-26
08:22 • Closed ticket [218427ffff]. artifact: fdb242742e user: welch
00:57 • New ticket [218427ffff]. artifact: d9df53f650 user: nobody

[clock scan] parser could use hash table lookups

Closed / Fixed218427ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:57:28
OriginalBugID: 5950 RFE
Version: 8.4a1
SubmitDate: '2000-06-26'
LastModified: '2000-08-14'
Severity: LOW
Status: Closed
Submitter: ericm
ChangedBy: ericm
OS: All
FixedDate: '2000-10-25'
ClosedDate: '2000-08-14'


Presently, [clock scan] uses a series of arrays to lookup words like "Tuesday" or "GMT".  This can be very slow; in fact, you can stack the deck, so to speak, against the scanner by choosing words that are at the end of the last table to be examined.  We can probably speed it up by using hash table lookups instead.  Of course, that requires a one-time "populate the hash table" call, but we can defer that to the first call to [clock scan], at least.  In any case, it's worth investigating, I think.  [clock scan] is a fairly pokey command.

- eric



After some experimentation, it seems that this modification has little or no impact on the speed of [clock scan].  In any case, [clock scan] is not typically a critical path command, so it's probably not worth spending a lot of time on it at this point.  Something else that might be worth trying is to use a string trie, but that's really something better left for a class project.  Surely it would be interesting to try, but maybe not worth the effort in the end.

- eric

-- 08/14/2000 ericm
welch Closed ticket [218427ffff]. [History diff]2000-10-26 08:22:15
dgp Ticket [218427ffff]: 3 changes [History diff]2001-04-05 06:56:34
Log in (anonymous is fine) to add a comment.