Ticket UUID: | 2825543 | |||
Title: | Time loss in expr | |||
Type: | Bug | Version: | obsolete: 8.5.7 | |
Submitter: | sbabbaro | Created on: | 2009-07-22 20:39:24 | |
Subsystem: | 48. Number Handling | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2009-07-23 03:53:33 | |
Resolution: | Invalid | Closed By: | dgp | |
Closed on: | 2009-07-22 20:53:33 | |||
Description: |
OS Platform Linux (openSuSE 11.0 and Ubuntu 8.04.2) and Windows XP (ActiveState Release 8.5.6 and 8.5.7) Problem Behavior: expression execution time grows continuously Expected Behavior: expression execution time approximately constant In attached file, I leave to you the script that shows this behavior (almost certainly due to conversion between numbers): is this behavior 'to be considered right' ? If you need further information I am available. | |||
User Comments: |
dgp added on 2009-07-23 03:53:33:
allow_comments - 1 print the value of $t to see what is happening. Note that in Tcl 8.4 integer values had limited range and when that range was overflowed the values truncated to that range automatically. Scripts like yours depend on that truncation. In Tcl 8.5 integer range is unlimited. Without truncation,the integers grow bigger. It takes longer and longer to compute on bigger and bigger integers. The solution, as noted in the release notes of Tcl 8.5.0 as something to take care over when migrating from earlier Tcl releases, is to make your integer truncation needs explicit by putting the appropriate int(.) or wide(.) function calls in your expressions. sbabbaro added on 2009-07-23 03:39:26: File Added - 336155: test.tcl |
Attachments:
- test.tcl [download] added by sbabbaro on 2009-07-23 03:39:26. [details]