Manifest of check-in
[76f96f2a4c]
- * generic/tclStringObj.c: Several revisions to the shimmering
patterns between Unicode and UTF string reps. Most notably the
call: objPtr = Tcl_NewUnicodeObj(...,0); followed by a loop of calls:
Tcl_AppendUnicodeToObj(objPtr, u, n); will now grow and append to
the Unicode representation. Before this commit, the sequence would
convert each append to UTF and perform the append to the UTF rep.
This is puzzling and likely a bug. The performance of [string map]
is significantly improved by this change (according to the MAP
collection of benchmarks in tclbench). Just in case there was some
wisdom in the old ways that I missed, I left in the ability to restore
the old patterns with a #define COMPAT 1 at the top of the file.
by
dgp on
2009-02-22 04:38:58.
B ac61ee395893ab793e426d97e8fa37554b4f8ed7
C \s\s\s\s\s\s\s\s*\sgeneric/tclStringObj.c:\s\s\s\s\s\s\sSeveral\srevisions\sto\sthe\sshimmering\n\s\s\s\s\s\s\s\spatterns\sbetween\sUnicode\sand\sUTF\sstring\sreps.\s\sMost\snotably\sthe\n\s\s\s\s\s\s\s\scall:\sobjPtr\s=\sTcl_NewUnicodeObj(...,0);\sfollowed\sby\sa\sloop\sof\scalls:\n\s\s\s\s\s\s\s\sTcl_AppendUnicodeToObj(objPtr,\su,\sn);\swill\snow\sgrow\sand\sappend\sto\n\s\s\s\s\s\s\s\sthe\sUnicode\srepresentation.\s\sBefore\sthis\scommit,\sthe\ssequence\swould\n\s\s\s\s\s\s\s\sconvert\seach\sappend\sto\sUTF\sand\sperform\sthe\sappend\sto\sthe\sUTF\srep.\n\s\s\s\s\s\s\s\sThis\sis\spuzzling\sand\slikely\sa\sbug.\s\sThe\sperformance\sof\s[string\smap]\n\s\s\s\s\s\s\s\sis\ssignificantly\simproved\sby\sthis\schange\s(according\sto\sthe\sMAP\n\s\s\s\s\s\s\s\scollection\sof\sbenchmarks\sin\stclbench).\s\sJust\sin\scase\sthere\swas\ssome\n\s\s\s\s\s\s\s\swisdom\sin\sthe\sold\sways\sthat\sI\smissed,\sI\sleft\sin\sthe\sability\sto\srestore\n\s\s\s\s\s\s\s\sthe\sold\spatterns\swith\sa\s#define\sCOMPAT\s1\sat\sthe\stop\sof\sthe\sfile.\n
D 2009-02-22T04:38:58
F ChangeLog 483145705dfb9a2ef6b3e6aac17357d3effee6c9
F compat/zlib/win32/zdll.lib 42a1860b131395a691394ecd8c2e3031aeef2a7e
F compat/zlib/win32/zlib1.dll 6d957ba632df5b06d49a901f2772df4301610a2a
F generic/tclExecute.c 3f51ca59b805e18cecb03e586fcb917386f357cc
F generic/tclInt.h 8e6d3eeb7fc8d312b5c6c9091adbbc5706b4fc59
F generic/tclPathObj.c e5d0e1847348a60671418ea3a0fd3f8195eb57d0
F generic/tclStringObj.c 228cbb82767b6edd30fff9a580e51483c145ccc2
F generic/tclTestObj.c 42ba3c6ecc77cb42dc2208ee792f8f3b10750137
F generic/tclZlib.c 7422e19f7e51f99af1edd38e54cc736d73fb6c61
F tests/fileName.test e66890590a2bca57a21af27baacc9e78b42a4138
F tests/stringObj.test f2f075a365e705cfc7ca26a18ba988fa32f94019
F win/Makefile.in 44aed5dd026030d6db1ef5f489cb39a9aff5f9e9
F win/configure e6b1e9c86c4afa8cb7499db6dd9eb62c27b7c983 x
F win/configure.in 50f8b470a84ad8512f938bded9c109788206c6aa
F win/tcl.m4 75772cbbb76435bf43296de558564f262b45c83e
P c8c2551b948dccaaf904fcd575733d0c71afa77f
U dgp
Z d3485dc61ab9951cc666dd02ed7a10b4