Changes between Version 3 and Version 4 of Submitting/TclTk


Ignore:
Timestamp:
06/21/14 05:23:21 (10 years ago)
Author:
martinl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Submitting/TclTk

    v3 v4  
    173173    Expressions via expr command:
    174174    Slow:
     175{{{
    175176        set y [expr $a * $x + $b]
     177}}}
    176178    Fast:
     179{{{
    177180        set y [expr {$a * $x + $b}]
    178 
     181}}}
    179182    Expressions in conditions:
    180183    Slow:
     184{{{
    181185        if [...] {...
     186}}}
    182187    Fast:
     188{{{
    183189        if {[...]} {...
    184 
     190}}}
    185191    Regular expressions:
    186192    Very slow:
     193{{{
    187194        regex "x(\[0-9\]+).*not" $string trash number
     195}}}
    188196    Fast:
     197{{{
    189198        regex {x([0-9]+).*not} $string trash number
    190 
     199}}}
    191200    If you really want speed:
    192201    If a regular expression needs to be constructed from variables but used