|
2014-09-11
| ||
| 12:45 | • Closed ticket [1332fc7df2]: LIST concat EVAL/LAPPEND performance regression ... artifact: da82bb146b user: dkf | |
|
2014-07-28
| ||
| 21:24 | • Ticket [1332fc7df2]: 3 changes artifact: 7e40a6e006 user: dgp | |
| 21:16 | • Ticket [1332fc7df2]: 3 changes artifact: 6946405c0f user: dgp | |
| 16:51 | • Ticket [1332fc7df2]: 3 changes artifact: 26565a4d08 user: dgp | |
| 16:51 | • New ticket [1332fc7df2]. artifact: bd112f0ff2 user: dgp | |
LIST concat EVAL/LAPPEND performance regression
Closed / Wont Fix1332fc7df2d9b267738a93590276a972fe4577c9Created 12 years agoUpdated 12 years ago
Descriptionplain2014-07-28 16:51:18
Starting with checkin [17150b71d2] (new
multi-arg [lappend] compile machinery), the
tclbench test for "LIST concat EVAL/LAPPEND"
suffer quite noticeably. The scenario tested
by those benchmarks is
proc demo {a b} {eval [list lappend a] $b}
dgp Ticket [1332fc7df2]: 3 changes
[History diff]2014-07-28 16:51:36
dgpplain2014-07-28 21:16:57
The slowdown in those benchmarks appears to
just be demonstrating that compiling the
multi-arg [lappend] command takes longer
than it used to, and that's not surprising.
The true flaw here seems to be that tclbench is
out of date, and the days when testing the
performance of
proc demo {a b} {eval {lappend a} $b}
was of any interest are now in the past. Any
sensible programmer is now going to code that
conception as
proc demo {a b} {lappend a {*}$b}
dgpplain2014-07-28 21:24:04
Even if one supposes a desire to avoid {*} use in tclbench,
the better implementation is still:
proc demo {a b} {eval [linsert $b 0 lappend a]}
This is a tclbench bug. Anyone maintaining it?
dkfhtml2014-09-11 12:45:42
Fixing tclbench is out-of-scope of this bug tracker. With any of the recommended code sequences, 8.6 is faster than 8.5 on the same hardware.
Log in (anonymous is fine) to add a comment.