Artifacts Associated With Ticket 842446ffffffffffffffffffffffffffffffffff
Ticket change [9ed480c13f] (rid 96543) by msofer on 2003-11-14 22:24:02:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Enclosing an alternative implementation for the bytecoded {expand} functionality - this is the update of tip157.patch.2 of [Patch 827119]. It builds the expanded command as a list at stacktop,instead of expanding into the stack (or malloc'ed mem if not enough stack present). This is likely to be slower than the version in HEAD in the worst case (more ckalloc and copying), but it is somewhat simpler: - no instructions with variable number of operands - the maximal stack required by the bytecode is still known at compile time - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "{expand} bcc alternatives"
- type initialized to: "Patch"
Ticket change [e0f8f9f93e] (rid 87364) by msofer on 2003-11-15 05:24:02:
- icomment:
File Added - 67546: expand-list.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [1e9bef02eb] (rid 91003) by msofer on 2003-11-16 01:33:07:
- assignee changed to: "dgp"
- icomment:
File Added - 67604: expand-inplace.patch Logged In: YES user_id=148712 Attached expand-inplace.patch that expands directly to the stack, without copying non-expanded arguments. The execution stack is grown at run time if it is not large enough to accomodate this command. It is simpler IMHO than the implementation at HEAD, and should be slightly faster too. It does not require instructions with variable number of arguments (+). Assigned to dgp for comment.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [e6d101dfd9] (rid 104355) by dkf on 2003-11-17 03:22:56:
- icomment:
Logged In: YES user_id=79902 expand-inplace.patch is faster than HEAD on short expansions but blows up when built with --enable-symbols=all due to failing the max-stack-depth check. expand-list.patch is slower than HEAD on short expansions, and like the HEAD it is safe with --enable-symbols=all Test code used for this evaluation: proc foo args {llength [list {expand}$args]} - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d874f4b4ec] (rid 107439) by msofer on 2003-11-17 06:21:40:
- icomment:
File Deleted - 67604: File Added - 67706: expand-inplace.patch Logged In: YES user_id=148712 Inplace patch revised: better stack estimation, fix for compile-debug that bypasses the stack depth check when an expansion is in progress.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d74f42c6ca] (rid 123960) by dgp on 2003-11-18 03:02:56:
- assignee changed to: "msofer"
- foundin changed to: "TIP Implementation"
- icomment:
Logged In: YES user_id=80530 looks like it should work.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [29202333fa] (rid 88818) by dgp on 2003-11-18 03:04:55:
- icomment:
Logged In: YES user_id=80530 BTW, the expandLinkList declaration is in the wrong place.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7143a84c86] (rid 100641) by msofer on 2003-11-18 03:27:29:
- icomment:
Logged In: YES user_id=148712 who put it there?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [768ff01c1c] (rid 105611) by msofer on 2003-11-18 03:27:30:
- icomment:
File Deleted - 67706: File Added - 67792: expand-inplace.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [b462f24b48] (rid 125025) by msofer on 2003-11-18 05:55:48:
- icomment:
Logged In: YES user_id=148712 Updated expand-inplace, corrected compile time stack depth estimation: - fix thread-safety (spotted by dkf) - added detailed comments
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [49f4f6cc28] (rid 126459) by msofer on 2003-11-18 05:55:49:
- icomment:
File Deleted - 67792: File Added - 67809: expand-inplace.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "expand-list.patch" [640b047ff8] (rid 92684) by msofer on 2003-11-20 05:41:12.
Ticket change [f55ad857db] (rid 130091) by msofer on 2003-11-20 05:41:13:
- icomment:
File Added - 68031: expand-list.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [c2d5c51603] (rid 111551) by msofer on 2003-11-20 05:41:14:
- icomment:
File Deleted - 67546:
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [391bff9c32] (rid 112329) by msofer on 2003-11-20 05:42:12:
- icomment:
File Deleted - 67809: File Added - 68032: expand-inplace.patch Logged In: YES user_id=148712 Patches updated so that they apply to HEAD
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "expand-inplace.patch" [ddf6a0a3c9] (rid 114772) by msofer on 2003-11-20 05:42:12.
Ticket change [6ab84c6d18] (rid 128200) by msofer on 2003-11-22 07:54:23:
- icomment:
File Added - 68266: expand.result Logged In: YES user_id=148712 Attached a benchmark script and timing results: results show that - t(list) < t(inplace) < t(eval) < t(head) for [{expand}$cmd] (resp. [eval $cmd]) - t(inplace) < t(head) < t(list) for [cmd A {expand}$lst B] - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [f3e75ba5bf] (rid 129801) by msofer on 2003-11-22 07:56:21:
- icomment:
File Added - 68267: expand.bench
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ef3f9848c7] (rid 108961) by msofer on 2003-11-22 08:35:39:
- icomment:
File Deleted - 68266: File Added - 68268: expand.result Logged In: YES user_id=148712 Oops - that was a wrong benchmark, not measuring much. Updated files,not definitive yet. The results are similar - except that both head and inline show nonlinear behaviour in the list size.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [9e1acce1a0] (rid 96421) by msofer on 2003-11-22 08:36:56:
- icomment:
File Deleted - 68267: File Added - 68269: expand.bench
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [14ff4b075a] (rid 124490) by msofer on 2003-11-22 20:21:28:
- icomment:
Logged In: YES user_id=148712 New, expanded benchmark. Summarizing the results when expanding lists of up to 10 elements (typical case?): H: HEAD, I: Inplace, L: list, timings in usecs/call: - for [{expand}$cmd]: H7, I6, L5 (pure list opt: 6) - for [$cmd A {expand}$lst B]: H7, I6, L9 - as before, but A and B longer expanded lists: H18, I15, L22 Amazingly, the list version seems to be faster when expanding long lists (100 to 1000 elements). Given the very slight differences, I'm inclined to opt for the list-based version: it is much simpler and it does not interfere with the evaluation stack mechanics. Other opinions? - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [cbce20ced2] (rid 95585) by msofer on 2003-11-22 20:21:29:
- icomment:
File Deleted - 68269: File Added - 68306: expand.result
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "expand.result" [c089eb1964] (rid 102420) by msofer on 2003-11-22 20:21:29.
Add attachment "expand.bench" [0b8017a3c2] (rid 113995) by msofer on 2003-11-22 20:24:45.
Ticket change [229180e5bb] (rid 130769) by msofer on 2003-11-22 20:24:45:
- icomment:
File Added - 68307: expand.bench
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d3774ae7c6] (rid 123296) by dkf on 2004-02-03 23:35:59:
- icomment:
Logged In: YES user_id=79902 Speed vs. Simplicity? Err, hard choice.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [9564008938] (rid 106148) by msofer on 2004-05-17 00:32:09:
- closedate changed to: "2004-05-16T17:32:09"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Committed the inplace version while still in alpha - committed path attached. The advantages are: - faster - no changes to INST_INVOKE(1|4) - simpler compilation code Another difference, with pros and cons, is that the execution stack is grown when needed, instead of allocating a temporary buffer. Pro: faster execution for subsequent {expand}, where the probability of not having enough stack is lower. Con: memory is allocated forever after, not returned to the OS. - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"
- username: "msofer"
Add attachment "expand-inplace-commit.patch" [dc6cbf5f06] (rid 114475) by msofer on 2004-05-17 00:32:10.
Ticket change [443c8346dc] (rid 116685) by msofer on 2004-05-17 00:32:10:
- icomment:
File Added - 87354: expand-inplace-commit.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment: