summaryrefslogtreecommitdiffstats
path: root/tools/microoptimization/generalbytecode.tcl
blob: 2471943f0932e4fde6f0e427c88a4a533a252320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
apply {{{limit1 100} {limit2 1000}} {
    for {set i 0} {$i < $limit1} {incr i} {
	apply {limit2 {
	    set a {}
	    set b {}
	    for {set i 0} {$i < $limit2} {incr i} {
		lappend a $i
		dict set b $i [expr {$i*$i}]
	    }
	    return [string length $a],[string length $b]
	}} $limit2
    }
}} {*}$argv