Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Avoid sharing cmdNames accross namespaces

Closed / Accepted1090905fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-12-24 17:50:36
This patch avoids sharing cmdName objects accross
namespaces, thus increasing the usage of cached
references and reducing the cost of repeated command
name lookups.

There is an obvious memory cost, as there are
previously shared literals that will not be shared now.

The recently namespace.bench shows:

Benchmark 1:8.5a3 /mnt/CVS/tcl_SF_clean/unix/tclsh-head
n 00:00:02 elapsed
Benchmark 2:8.5a3 /mnt/CVS/tcl_SF_clean/unix/tclsh-lit
n 00:00:01 elapsed
000 VERSIONS:      1:8.5a3 2:8.5a3
001 NS alternating    1640    1165
001 BENCHMARKS     1:8.5a3 2:8.5a3
msoferplain2004-12-25 00:50:36
File Added - 113506: patchLit
msoferplain2004-12-25 00:51:13
Logged In: YES 
user_id=148712

Committed
msoferplain2004-12-25 01:05:41
File Deleted - 113506: 



File Added - 113507: patchLit
msoferplain2004-12-25 01:08:46
Logged In: YES 
user_id=148712

Note: forgot to mention another memory cost - the
LiteralEntry struct grew from '2ptrs+1int' to '3ptrs+1int'
Log in (anonymous is fine) to add a comment.

Attachments: