options variables: features vs. overhead (curiosity)
Daniel J. Luke
dluke at geeklair.net
Mon Jan 9 15:30:24 CET 2017
On Jan 8, 2017, at 6:06 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
> Out of pure curiosity: what's the overhead incurred by using options variables as simple boolean state variables that are probably set only once but possibly read many times, compared to native Tcl variables?
>
> I'm thinking in terms of cumulative effect on iterative or recursive operations like portindex and dependency calculations.
>
> Same thing with `[tbool foo]` instead of `[info exists foo] && ${foo}`: is there a significant overhead in Tcl in moving (frequent) operations to a procedure?
I don't know, why don't you build a simple benchmark, test it, and report back with your results?
--
Daniel J. Luke
More information about the macports-dev
mailing list