Skip to content
Tcl Source Code History Of Ticket 1820448fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1820448fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1820448fffffffffffffffffffffffffffffffff

  1. Ticket change [99e28cd429] (rid 110866) by das on 2007-10-26 04:23:11:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The attached patch optionally replaces the giant switch in TEBC by a computed goto (GCC extension, also available e.g. in sun cc).
      
      This speeds up loops.bench by around 5% and the whole of tclbench by around 1% (on average) on my macosx powerpc.
      
      if this proves to be worthwhile on other platforms, I will add autoconf machinery to detect if computed gotos are available, for now control use of computed gotos via
      the USE_COMPUTED_GOTO #define at line 193
      
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "das"
    10. subsystem initialized to: "47. Bytecode Compiler"
    11. title initialized to: "TEBC: replace giant switch by computed goto"
    12. type initialized to: "Patch"
  2. Add attachment "tclExecute-compgoto.diff" [a2c56766fa] (rid 109950) by das on 2007-10-26 11:23:11.

  3. Ticket change [52d154ca1d] (rid 126384) by das on 2007-10-26 11:23:11:

    1. icomment:
      
      
      File Added - 251380: tclExecute-compgoto.diff
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  4. Ticket change [a71d468457] (rid 98727) by das on 2007-11-10 02:18:33:

    1. icomment:
      
      
      File Added - 253600: tclExecute-TEBCinline-compgoto.diff
      
      Logged In: YES 
      user_id=90580
      Originator: YES
      
      updated patch attached:
      - now includes configure checks for computed goto and __builtin_expect availability
      - added configurable inlining of common code into the NEXT_INST_{F,V} macros according to TEBC_INLINE_LEVEL:
      0 no inlining
      1 inline cleanup code
      2 also inline async handler and other check code
      3 also inline peephole gotos
      4 also do indirect threading (direct computed goto to next instruction)
      (level 4 obviously only makes sense when computed gotos are available, but the others are effective for the giant switch as well).
      - configuration of inline level & computed goto use is currently manual via the defines at the top of tclExecute.c
      
      I see improved performance with inceasing inline level, for both giant switch and computed goto, with the biggest benefit from indirect threading (-DTEBC_INLINE_LEVEL=4 -DUSE_COMPUTED_GOTO=1); however code size does also significantly increase with inline level.
      
      tests done on a powerpc 7455, may well be different on other processors?
      
      detailed benchmark numbers forthcoming...
      
      File Added: tclExecute-TEBCinline-compgoto.diff
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. priority changed to: "6"
    5. username: "das"
  5. Add attachment "tclExecute-TEBCinline-compgoto.diff" [8ab39d05d2] (rid 127435) by das on 2007-11-10 02:18:33.