Overview
| Artifact ID: | c71575130dc5026a886cacb2bbf09f42b122fee4 |
|---|---|
| Ticket: | 1174551fffffffffffffffffffffffffffffffff
TclDecrRefCount performance |
| User & Date: | msofer on 2005-04-02 04:02:11 |
Changes
- icomment:
File Added - 128130: TDRCpatch Logged In: YES user_id=148712 New patch - moving the deletion context machinery to tclObj.c The really heavy users of TDRC (TEBC) most frequently free objects with freeIntRepProc==NULL: either freshly created by string concatenation, or a numerical result of a computation. The macro is as fast and small as possible for that case. The other cases pay the penalty of a function call to TclFreeObj. An alternative approach is keeping TDRC unchanged, but making the deletion context cheaper to access repeatedly (either by caching it at TEBC entry, or in a slot in the interp structure). Even then, the overhead is non-negligible, especially for objs without a string rep - as can be measured in an unthreaded build. As discussed in the chat, we can later factor the context lookup out of TclFreeObj, and have a version that takes interp as argument to allow for faster access. This version can then be used for TDRC, while leaving T_DRC unchanged.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"