Check-in [86167d6917]
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a 'cos2' test case to illustrate the cost of non-numeric ordering comparisons
Timelines: family | ancestors | descendants | both | notworking | kbk-jumpthread
Files: files | file ages | folders
SHA3-256:86167d691745292d2ca3c0b0c47f96e623a7595774afcb30d24d520178b1c10f
User & Date: kbk 2018-12-16 04:55:59
Context
2018-12-16
05:18
Add constant folding for unary +. It probably ought to be folded out altogether, since it serves only to trigger type checking. Add an outline of the actual process of jump threading once the threads have been determined. check-in: c388c8737b user: kbk tags: notworking, kbk-jumpthread
04:55
Add a 'cos2' test case to illustrate the cost of non-numeric ordering comparisons check-in: 86167d6917 user: kbk tags: notworking, kbk-jumpthread
04:43
Finish forward analysis in the jump threading pass. check-in: dc90afa15d user: kbk tags: notworking, kbk-jumpthread
Changes

Changes to demos/perftest/tester.tcl.

29
30
31
32
33
34
35











36
37
38
39
40
41
42
....
2260
2261
2262
2263
2264
2265
2266

2267
2268
2269
2270
2271
2272
2273
....
2589
2590
2591
2592
2593
2594
2595

2596
2597
2598
2599
2600
2601
2602
    set t 1.0
    set i 0
    while {[incr i] < $n} {
	set t [expr {-$t*$x*$x / [incr j] / [incr j]}]
	set s [expr {$s + $t}]
    }
    return $s











}
proc coscaller1 {x} {
    cos [expr {double($x)}]
}
proc coscaller2 {} {
    for {set i -100} {$i <= 100} {incr i} {
	set x [expr {0.00314159 * $i}]
................................................................................
set errorCode {}
set demos {
    # Mathematical operations; [fib] and [cos] are supposed to be accelerated
    # heavily, the others are less critical
    {fib 85}
    {fib-r 15}
    {cos 1.2}

    # Fails on a roundoff error: {tantest 1.2}
    {inttest 345}
    {math::ln_Gamma 1.3}
    {polartest 0.6 0.8}
    {lmapconsttest}
    {powmul1 13 3}
    {powmul2 13 3}
................................................................................
# compilation engine will do that for us if necessary.

set toCompile {
    # Mathematical operations; [fib] and [cos] are supposed to be accelerated
    # heavily, the others are less critical
    fib fib-r
    ::cos

    tantest
    inttest
    math::ln_Gamma
    polartest
    lmapconsttest
    shift
    powmul1 powmul2







>
>
>
>
>
>
>
>
>
>
>







 







>







 







>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
....
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
....
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
    set t 1.0
    set i 0
    while {[incr i] < $n} {
	set t [expr {-$t*$x*$x / [incr j] / [incr j]}]
	set s [expr {$s + $t}]
    }
    return $s
}
proc cos2 {x {n 16}} {
    set j 0
    set s 1.0
    set t 1.0
    set i 0
    while {+[incr i] < +$n} {
	set t [expr {-$t*$x*$x / [incr j] / [incr j]}]
	set s [expr {$s + $t}]
    }
    return $s
}
proc coscaller1 {x} {
    cos [expr {double($x)}]
}
proc coscaller2 {} {
    for {set i -100} {$i <= 100} {incr i} {
	set x [expr {0.00314159 * $i}]
................................................................................
set errorCode {}
set demos {
    # Mathematical operations; [fib] and [cos] are supposed to be accelerated
    # heavily, the others are less critical
    {fib 85}
    {fib-r 15}
    {cos 1.2}
    {cos2 1.2}
    # Fails on a roundoff error: {tantest 1.2}
    {inttest 345}
    {math::ln_Gamma 1.3}
    {polartest 0.6 0.8}
    {lmapconsttest}
    {powmul1 13 3}
    {powmul2 13 3}
................................................................................
# compilation engine will do that for us if necessary.

set toCompile {
    # Mathematical operations; [fib] and [cos] are supposed to be accelerated
    # heavily, the others are less critical
    fib fib-r
    ::cos
    ::cos2
    tantest
    inttest
    math::ln_Gamma
    polartest
    lmapconsttest
    shift
    powmul1 powmul2