summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--tests/binary.test13
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b129a8..449a1fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
2008-07-23 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
* tests/lrange.test: Added relative speed test to check for lrange
- in-place optimization committed 2008-06-30.
+ in-place optimization committed 2008-06-30.
+ * tests/binary.test: Added relative speed test to check for pure
+ byte array CONCAT1 optimization committed 2008-06-30.
2008-07-23 Andreas Kupries <andreask@activestate.com>
diff --git a/tests/binary.test b/tests/binary.test
index 2f71866..7f41559 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: binary.test,v 1.35 2008/07/19 22:50:38 nijtmans Exp $
+# RCS: @(#) $Id: binary.test,v 1.36 2008/07/23 23:19:33 ferrieux Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2700,6 +2700,17 @@ test binary-75.23 {binary decode uuencode} -body {
list [string length $r] $r
} -result {3 abc}
+test binary-76.1 {byte array concat speed} -body {
+ set b1 [binary format H* [string repeat E9 1000000]]
+ set b2 [binary format H* 41]
+ set t1 [lindex [time {set z ${b1}${b2}}] 0]
+ unset z
+ set b1 [binary format H* [string repeat E9 1000000]]
+ set b2 [binary format H* 41]
+ set t2 [lindex [time {set z ${b1}é}] 0]
+ expr {($t2/$t1)>3}
+} -result 1
+
# cleanup
::tcltest::cleanupTests
return