Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-11-29
22:46 • Ticket [429916ffff] binary scan large string optimisation status still Clo... artifact: 077491f507 user: dkf
22:46 • Ticket [429916ffff]: 7 changes artifact: 83e7c43442 user: dkf
22:46 • Closed ticket [429916ffff]. artifact: a0dc8d5f95 user: dkf
2001-06-04
08:13 • Add attachment binary.patch to ticket [429916ffff] artifact: a6899c9e09 user: hobbs
08:13 • Ticket [429916ffff] binary scan large string optimisation status still Ope... artifact: b788e75820 user: hobbs
05:21 • Add attachment binary.patch to ticket [429916ffff] artifact: a96a559853 user: msofer
05:21 • Ticket [429916ffff] binary scan large string optimisation status still Ope... artifact: b57f4a0de1 user: msofer
2001-06-03
22:21 • New ticket [429916ffff]. artifact: d714535635 user: msofer

[binary scan] large string optimisation

Closed / Out of Date429916ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2001-06-03 22:21:44
This is similar to DKF's solution of [Bug #131523]:
when splitting binary strings into integer components
(c*, s*, S*, i*, I* format strings), it avoids creating
a Tcl_Obj per integer. Using a hash table, it creates
just one Tcl_Obj per integer, with multiple assignments
if it appears more than once.

Makes a huge difference to splitting of long binary
strings, such as is done in the mime package in tcllib.
msoferplain2001-06-04 05:21:45
File Added - 6976: binary.patch
hobbsplain2001-06-04 08:13:47
File Added - 6978: binary.patch

Logged In: YES 
user_id=72656

This doesn't improve speed because the ScanNumber
always creates an object.  A slight change allows
this to improve speed (attached patch), but only
starting at 5000 byte of input (as opposed to the
split version, which benefits already at 500 chars).
dkf Closed ticket [429916ffff]. [History diff]2001-11-29 22:46:32
dkfplain2001-11-29 22:46:33
Logged In: YES 
user_id=79902

I've had a look at this, and found that the most effective
technique was to limit the size of the cache (260 entries
worked well and should handle the split-byte-case nicely)
and *delete* the cache and stop looking once the number of
elements exceeded that. I suppose this has something to do
with the marginal benefit from adding a few more elements at
that size being very small. Not particularly obvious, I must
admit...
dkf Ticket [429916ffff]: 2 changes [History diff]2001-11-29 22:46:34
Log in (anonymous is fine) to add a comment.

Attachments: