Overview
| Artifact ID: | d4436c8a92af1b66a0575e9856d84bcb0edf3590 |
|---|---|
| Ticket: | 903765ffffffffffffffffffffffffffffffffff
avoid quadratic parsing time |
| User & Date: | dgp on 2004-02-24 22:07:40 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
It's been noted on the Wiki... http://wiki.tcl.tk/9585 that the runtime of expr 1[string repeat +1 $N] is quadratic in $N. This is due to Tcl_ParseExpr(). After each + is parsed in ParseAddExpr(), a call is made to PrependSubExprTokens to shift the already parsed operands down the token array to make room for the operand token at the beginning. This means that $N times, $n tokens are copied (as $n grows from 1 to $N) just to get the parsing done -- quadratic complexity. Similar issues arise with other expressions that call PrependSubExprTokens. For most short expressions, this penalty hardly matters, but a more scalable parser would be nice. - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "45. Parsing and Eval"
- title changed to: "avoid quadratic parsing time"
- type changed to: "RFE"