Overview
| Artifact ID: | 6ee4904a950486de0627f43afd2a8667e9f4d726 |
|---|---|
| Ticket: | 716b427f76f8f97a8d9a06043903c53bb2b592c2
Suboptimal bytecode for $a[unset a] |
| User & Date: | dgp on 2017-06-01 16:30:14 |
Changes
- closedate changed to: "2457906.18766751"
- closer changed to: "dgp"
- icomment:
Agree that was inadequate. I had only a fleeting moment, but I wanted to at least record dissent before the train got too many miles away from the station. The dgp-string-cat branch was one of several efforts to route string operations through a single implementation where before there had been multiple duplicate implementations, each with its own quirky set of bugs or inefficiencies. There are several more that still need doing. (StringMatch !) Tcl strings are unexpectedly complex beasts with at least 3 intreps to deal with. It's really a much better idea to implement each string operation only once and get it right. This also paves the way to explore wholesale replacement of the current complex beast with some other ones, without the need to grep through the whole codebase seeking all N implementations of string concatenation. Attaching some optimizations to just one caller of TclStringCatObjv() looks like the first step in reversing that refactoring course, so I reacted in protest. I also protest the expectation that in a branch dedicated to alpha explorations, we have to remain slaves to the absolute best performance. That's a recipe for sticking in local optima of implementation and missing the chance to incrementally move to radically better approaches. I've had similar objections to other performance-chasing on trunk based on things like Tcl_ObjType-probing where the sort of encapsulations that make effective refactoring possible get broken for the sake of sub-microsecond differences. It's polishing a statue before it even takes its form. That said, performance is important, and that's why I asked this ticket be opened so that we would address this problem in time. Looking a bit longer and more carefully now, I think an adaptation of this will be fine. I'll take a stab at it as I shift the branches around. I will note that it's a known assertion that (opnd >= 2) so much of the added code covers cases that cannot happen. I'll make that clear in my edits.
- login: "dgp"
- mimetype: "text/plain"