On 07/11/2017 06:09,
wren...@gmail.com wrote:
> The new app built with Tcl8.6.3 (TCLALLOC mode, threaded and shared)
> uses TCL_EVAL() which runs 20% slower than the old app built with
> Tcl8.5.10 (TCLALLOC mode, threaded, shared).
There are some aspects of Tcl which most definitely did get slower from
8.5 to 8.6, often with good reasons, but there are other aspects that
got faster. Because of that, it's extremely difficult to make a
statement that could help you without seeing a sample of code that is
problematic; details matter a lot here.
However, that said… Tcl_Eval() itself is not a path that receives heavy
performance optimisation; it literally requires its scripts to be
interpreted from scratch with very little possibility of caching that is
worthwhile. Tcl_EvalObj(), Tcl_EvalObjEx() and Tcl_EvalObjv() are code
paths that admit going quite a bit faster, though at the cost of the API
being a bit different. (Yes, they all evaluate something, but the
details vary critically.)
Donal.
--
Donal Fellows — Tcl user, Tcl maintainer, TIP editor.