|
2017-08-17
| ||
| 18:14 | Work around [3397978fff] check-in: a20a2ff810 user: andy tags: amg-string-insert | |
| 17:29 | Backout [b163c4f423]: Command ensembles indeed do affect argument reference counts, see [3397978fff] check-in: b83433c23f user: andy tags: amg-string-insert | |
|
2017-08-16
| ||
| 16:14 | • Ticket [3397978fff] Ensembles force argument sharing status still Open with ... artifact: 5c2379c3a6 user: sebres | |
|
2011-08-25
| ||
| 22:32 | • Ticket [3397978fff]: 4 changes artifact: 24681dc9a3 user: ferrieux | |
| 12:43 | • New ticket [3397978fff]. artifact: 39ff9dfd62 user: dgp | |
Ensembles force argument sharing
Was observed while pursuing 3396731 that [string reverse $foo] always reaches the command procedure with $foo a shared value while [tcl::string::reverse $foo] can deliver an unshared value to the command procedure. If using ensembles reduces value sharing in this way, that might have unwelcome impacts. Request we examine and see what's possible here. Unexamined, off-the-wall thought: do we need to implement ensemble dispatch in terms of tailcall to improve this?
a20a2ff810Work around [3397978fff] check-in2017-08-17 18:14:24b83433c23fBackout [b163c4f423]: Command ensembles indeed do affect argument reference counts, see [3397978fff] check-in2017-08-17 17:29:19
Copying miguel's comment from 3396731 on that matter: > If we find a way to fixt that and do "frame surgery", we should make sure > to also use elsewhere - the [interp alias] implementation is a definite > candidate
Just as notice to me. Fixed in sebres-rewrite-ensemble resp. sebres-perf-branch (should be still rebased to fossil from git).
Reason: - the first reference increment occurred if the parameters going in the call stack of "ens cmd" (mostly not compiled only, but sometimes compiled also); - the second increment by the ensemble rewrite (within instruction INST_INVOKE_REPLACE), if replaced to the call "::tcl::ens::cmd" during the execution.
Annoying that this affects currently the performance in 2 ways: - firstly it causes an unnecessary handling, because of the shared state of given objects (objects duplication, memory effort, cpu-cache washout etc). - secondly causes additional execution overhead (create/release the list of arguments), see my last comment (2017-01-04) on ticket [3485833].