Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5898841795b242ccab1bd49087cf7c912335efff
Ticket: 1693802fffffffffffffffffffffffffffffffff
INST_INVOKE speedup
User & Date: msofer on 2007-04-04 20:21:29
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    Originator: YES
    
    Those comments will be added, thank you.
    
    I did not run the full benchmark suite, but did see 10-20% speed improvements in the OO microbenchmarks for different OO systems.
    
    As to the mistery about "calling out of TEBC is expensive", my comments are:
    
    (1) that is surely a bad explanation: the new code does one function call out of TEBC (possibly more), just like the old one
    
    (2) here we are inlining a very specialised version of TEOvI: flags==0, no traces, the Command is already known to exist and known. IOW, we are replacing a 100+ loc function (assuming ~50% comments) with 10 loc in TEBC. In Chuck Moore's manner of speaking: we are deciding many things at edit time (like flags=0) instead of checking at run time.
    
    (3) Very aggressive refactoring could be a different way of attaining similar results, but I am not sure that TEOvI_reallyInternalCircle0Ex() would be an addition that would make maintenance much easier ;)
    
    My guess is that (2) has positive effects on cache behaviour, possibly depending on how clever the compiler/cpu combination is about prefetching. The effect might also be obtained with good compiler hints, but those tend to be non-portable (eg, gcc's __builtin_expect for branches) and also harder to maintain.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"