Tcl Source Code

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

File Added - 113506: patchLit

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

Committed

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

File Deleted - 113506: 



File Added - 113507: patchLit

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'

Attachments: