Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Improve performance of [concat]

Closed / Fixed218824ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:06:03
OriginalBugID: 2257 RFE
Version: 8.1
SubmitDate: '1999-06-21'
LastModified: '1999-12-11'
Severity: LOW
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 2101 2098
OS: Other
Machine: NA
FixedDate: '1999-12-11'
FixedInVersion: 8.3b1
ClosedDate: '2000-10-25'


Name:
Paul Duffin

Comments:
The patch for 8.1 also contains some fixes to the Tcl_Set...Obj methods
    which
    have already gone into 8.1.1.

DesiredBehavior:
[concat] is slow, doesn't scale and destroys internal representations of
    objects
    because it handles strings and not lists as its documentation describes.
    Many
    people have used [concat] mistakenly assuming that it handles lists.

    The supplied patch (one for 8.1 and one for 8.1.1) fixes up [concat] so
    it works
    almost as fast as an [lconcat] (also part of the patch) while still
    maintaining
    the semantics when working with strings.

Patch:
http://freehosting1.at.webjump.com/pd/pduffin-webjump/patches/tcl8.1/concat8.1.diff.gz
http://freehosting1.at.webjump.com/pd/pduffin-webjump/patches/tcl8.1.1/concat8.1.1.diff.gz

PatchFiles:
generic/tclBinary.c generic/tclResult.c generic/tclStringObj.c
    generic/tclBasic.c generic/tclObj.c generic/tclCmdIL.c generic/tclVar.c
    generic/tcl.decls generic/tclUtil.c generic/tclInt.h
    generic/tclListObj.c generic/tclNamesp.c tests/concat.test doc/concat.n
    unix/mkLinks



For 8.3b1, I have made Tcl_ConcatObj work on pure lists and return
a list object.  Also, Tcl_EvalObjEx is made list aware for the
TCL_EVAL_DIRECT case.  These enhancement should suffice for the
standard cases.  A better [lconcat] will be made separately. 
-- 12/11/1999 hobbs
welch Closed ticket [218824ffff]. [History diff]2000-10-26 08:29:17
Log in (anonymous is fine) to add a comment.