diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2008-07-23 23:19:31 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2008-07-23 23:19:31 (GMT) |
commit | 7b1a1c06d6d6cdf4035ef5b35802f85862b27088 (patch) | |
tree | 6df0c2ac34f68c053e371f29fcfda6aab9419f8c | |
parent | 4f9bbccc00c295f21e8675079ffa2664f4d2c41d (diff) | |
download | tcl-7b1a1c06d6d6cdf4035ef5b35802f85862b27088.zip tcl-7b1a1c06d6d6cdf4035ef5b35802f85862b27088.tar.gz tcl-7b1a1c06d6d6cdf4035ef5b35802f85862b27088.tar.bz2 |
Added relative speed test for pure byte array concats.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | tests/binary.test | 13 |
2 files changed, 15 insertions, 2 deletions
@@ -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 |