Overview
| Artifact ID: | 3d82543833b438532617e3315f3936c0d1201e66 |
|---|---|
| Ticket: | 231523ffffffffffffffffffffffffffffffffff
[split $longString ""] uses far too much memory |
| User & Date: | dkf on 2001-02-09 18:12:24 |
Changes
- icomment:
My goodness! Further testing indicates this is a speedup even for shorter strings. First, for comparison the tclsh8.3 version which used the old algorithm I believe: $ tclsh8.3 % set s "This is a long string to type but a short string to split." This is a long string to type but a short string to split. % time {split $s {}} 10000 229 microseconds per iteration Now the new version using my changed code: $ /tmp/bin/tclsh8.4 % set s "This is a long string to type but a short string to split." This is a long string to type but a short string to split. % time {split $s {}} 10000 181 microseconds per iteration - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"