Tcl Source Code

View Ticket
Login
Ticket UUID: 1090905
Title: Avoid sharing cmdNames accross namespaces
Type: Patch Version: None
Submitter: msofer Created on: 2004-12-24 17:50:36
Subsystem: 47. Bytecode Compiler Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-12-25 01:08:46
Resolution: Accepted Closed By: msofer
    Closed on: 2004-12-24 17:51:13
Description:
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
User Comments: msofer added on 2004-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'

msofer added on 2004-12-25 01:05:41:

File Deleted - 113506: 



File Added - 113507: patchLit

msofer added on 2004-12-25 00:51:13:
Logged In: YES 
user_id=148712

Committed

msofer added on 2004-12-25 00:50:36:

File Added - 113506: patchLit

Attachments: