Changes between Version 3 and Version 4 of Submitting/TclTk
- Timestamp:
- 06/21/14 05:23:21 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Submitting/TclTk
v3 v4 173 173 Expressions via expr command: 174 174 Slow: 175 {{{ 175 176 set y [expr $a * $x + $b] 177 }}} 176 178 Fast: 179 {{{ 177 180 set y [expr {$a * $x + $b}] 178 181 }}} 179 182 Expressions in conditions: 180 183 Slow: 184 {{{ 181 185 if [...] {... 186 }}} 182 187 Fast: 188 {{{ 183 189 if {[...]} {... 184 190 }}} 185 191 Regular expressions: 186 192 Very slow: 193 {{{ 187 194 regex "x(\[0-9\]+).*not" $string trash number 195 }}} 188 196 Fast: 197 {{{ 189 198 regex {x([0-9]+).*not} $string trash number 190 199 }}} 191 200 If you really want speed: 192 201 If a regular expression needs to be constructed from variables but used