Skip to content
Tcl Source Code Check-in [c78da914be]
Login

Check-in [c78da914be]

Overview
Comment: * generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclUtf.c: added TclpUtfNcmp2 private command that mirrors Tcl_UtfNcmp, but takes n in bytes, not utf-8 chars. This provides a faster alternative for comparing utf strings internally. (Tcl_UniCharNcmp, Tcl_UniCharNcasecmp): removed the explicit end of string check as it wasn't correct for the function (by doc and logic). * generic/tclCmdMZ.c (Tcl_StringObjCmd): reworked the string equal comparison code to use TclpUtfNcmp2 as well as short-circuit for equal objects or unequal length strings in the equal case. Removed the use of goto and streamlined the other parts. * generic/tclExecute.c (TclExecuteByteCode): added check for object equality in the comparison instructions. Added short-circuit for != length strings in INST_EQ, INST_NEQ and INST_STR_CMP. Reworked INST_STR_CMP to use TclpUtfNcmp2 where appropriate, and only use Tcl_UniCharNcmp when at least one of the objects is a Unicode obj with no utf bytes.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c78da914bed148014464cf2ed45f9ffb37c6b626
User & Date: hobbs on 2002-05-29 09:09:57.000
Other Links: manifest | tags
Context
2002-05-29
10:35
Made Tcl_UniCharNcmp faster on big-endian machines; the system memcmp()is probably optimized far in ... check-in: b3535ea391 user: dkf tags: trunk
09:09
* generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclUtf.c: ad... check-in: c78da914be user: hobbs tags: trunk
09:09
* generic/tclCompCmds.c (TclCompileStringCmd): removed error creation in code that no longer throw... check-in: 9901b51fc6 user: hobbs tags: trunk
Changes