From: SourceForge.net <no...@so...> - 2006-10-28 17:08:40
|
Bugs item #1586292, was opened at 2006-10-28 13:00 Message generated for change (Comment added) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1586292&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: 48. Threading Group: development: 8.5a6 Status: Open Resolution: None Priority: 5 Private: No Submitted By: miguel sofer (msofer) Assigned to: miguel sofer (msofer) Summary: threaded build too slow? Initial Comment: For reasons that are not important here, I timed the speed of proc and ensemble calls in current HEAD. The threaded build is *much* slower (1.75x). The script at /tmp/test is proc a {x y} {set x 1} namespace ensemble create -command ::w -map {a a} # Just to make the timings stabilise accross runs # ... probably too much, but who cares time {a 1 2} 10000 time {w a 1 2} 10000 lappend res proc:[time {a 1 2} 10000] lappend res ense:[time {w a 1 2} 10000] lappend res [info patchlevel] puts [join $res \n] Building with --disable-shared I get sh-3.1# ./tclsh /tmp/test proc:2.3583 microseconds per iteration ense:3.1632 microseconds per iteration 8.5a6 and with --disable-shared --enable-threads sh-3.1# ./tclsh /tmp/test proc:4.1325 microseconds per iteration ense:5.8033 microseconds per iteration 8.5a6 ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2006-10-28 14:08 Message: Logged In: YES user_id=148712 Disabling the call to TclpCheckStackSpace in TclInterpReady makes threaded builds quite a bit faster: mig@ice:/home/CVS/tcl_SF_clean/unix$ ./tclsh /tmp/test proc:3.0335 microseconds per iteration ense:4.5398 microseconds per iteration 8.5a6 ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2006-10-28 14:01 Message: Logged In: YES user_id=148712 Threaded build using glibc's malloc instead of Tcl's pooled allocator it is even slower, so the problem is probably not mainly with the allocator. mig@ice:/home/CVS/tcl_SF_clean/unix$ ./tclsh /tmp/test proc:4.4455 microseconds per iteration ense:6.0062 microseconds per iteration 8.5a6 ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2006-10-28 13:21 Message: Logged In: YES user_id=148712 With ActiveTcl it is even slower (I imagine this is due to the shared build, as not much optimisation has been done in proc calls since then): mig@ice:/home/CVS/tcl_SF_clean/unix$ tclsh /tmp/test proc:5.4506 microseconds per iteration ense:7.678 microseconds per iteration 8.5a4 % parray ::activestate::ActiveTcl ::activestate::ActiveTcl(arch) = linux-ix86 ::activestate::ActiveTcl(as,mode) = normal ::activestate::ActiveTcl(build) = 261540 ::activestate::ActiveTcl(buildtime,fmt) = Sat Apr 15 01:24:58 AM PDT 2006 ::activestate::ActiveTcl(buildtime,sec) = 1145089498 ::activestate::ActiveTcl(maturity) = beta-5 ::activestate::ActiveTcl(product) = ActiveTcl ::activestate::ActiveTcl(release) = 8.5.0.0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1586292&group_id=10894 |