From: SourceForge.net <no...@so...> - 2006-09-29 17:28:03
|
Patches item #1522510, was opened at 2006-07-14 09:04 Message generated for change (Settings changed) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=1522510&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 46. Bytecode Compiler Group: None >Status: Pending Resolution: None Priority: 5 Submitted By: Christoph Bauer (fridolin) >Assigned to: Don Porter (dgp) Summary: Tcl_ExprObj: avoid Tcl_GetStringFromObj Initial Comment: This patch avoids an call to Tcl_GetStringFromObj on byte-compiled expressions in Tcl_ExprObj (common path). It's speed up (slightly) the recursive benchmark from the "Computer Language Shootout". Not much, but the patch is very simple. ---------------------------------------------------------------------- Comment By: Christoph Bauer (fridolin) Date: 2006-07-27 04:56 Message: Logged In: YES user_id=13583 The data are not very impressive. Done under linux: with the patch: clsh recursive.tcl 3 24,82s user 0,07s system 96% cpu 25,661 total tclsh recursive.tcl 3 24,30s user 0,03s system 97% cpu 24,968 total tclsh recursive.tcl 3 24,58s user 0,02s system 93% cpu 26,280 total tclsh recursive.tcl 3 24,61s user 0,04s system 93% cpu 26,256 total without the patch: tclsh recursive.tcl 3 25,17s user 0,03s system 93% cpu 27,031 total tclsh recursive.tcl 3 25,10s user 0,07s system 92% cpu 27,254 total tclsh recursive.tcl 3 24,80s user 0,08s system 97% cpu 25,541 total tclsh recursive.tcl 3 24,78s user 0,05s system 96% cpu 25,644 total I'll upload a slightly simpler patch. There just a block is moved. ---------------------------------------------------------------------- Comment By: Christoph Bauer (fridolin) Date: 2006-07-27 04:56 Message: Logged In: YES user_id=13583 The data are not very impressive. Done under linux: with the patch: clsh recursive.tcl 3 24,82s user 0,07s system 96% cpu 25,661 total tclsh recursive.tcl 3 24,30s user 0,03s system 97% cpu 24,968 total tclsh recursive.tcl 3 24,58s user 0,02s system 93% cpu 26,280 total tclsh recursive.tcl 3 24,61s user 0,04s system 93% cpu 26,256 total without the patch: tclsh recursive.tcl 3 25,17s user 0,03s system 93% cpu 27,031 total tclsh recursive.tcl 3 25,10s user 0,07s system 92% cpu 27,254 total tclsh recursive.tcl 3 24,80s user 0,08s system 97% cpu 25,541 total tclsh recursive.tcl 3 24,78s user 0,05s system 96% cpu 25,644 total I'll upload a slightly simpler patch. There just a block is moved. ---------------------------------------------------------------------- Comment By: Christoph Bauer (fridolin) Date: 2006-07-27 04:43 Message: Logged In: YES user_id=13583 Sorry, the patch was done against tcl8.5a4. Vefore submitting I made some test with the attached program, which does mostly expr-calculations. It is taken from the "Computer Language Shootout". ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2006-07-17 11:25 Message: Logged In: YES user_id=80530 what version of Tcl sources is the patch for? The patch appears to be all about replacing one form of special-case optimization with some other form of special-case optimization. I don't know that that makes much sense without some benchmarking data guiding the way. The old optimizations might well be relics and better removed, but some measurements ought to tell us that. Got any? That said, Tcl_GetStringFromObj() on a Tcl_Obj that already has a string rep (which an expression should) ought to be really cheap, so I'd expect the patch to make little difference. What's the data say? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=1522510&group_id=10894 |