Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[clock format] speedup

Closed / Accepted1361927fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-11-20 07:19:36
Attached a patch where [clock format] defines a special
proc for each option set: the formatting is then done
by a single call to [format].

The patch passes all tests. One worry though: if the
timezone changes between calls, the cached proc is
wrong. This might be fixed with a trace, if it is
important.

BTW, you had a very accurate estimate on the speedup: 25%
msoferplain2005-11-20 14:19:39
File Added - 156918: clock.patch
msoferplain2005-11-20 21:27:23
File Added - 156947: clock.patch
msoferplain2005-11-20 21:27:24
File Deleted - 156918:
msoferplain2005-11-30 08:57:51
Logged In: YES 
user_id=148712

RE the recently committed speedup via C, I get compiler
warnings:

/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c: In
function ‘ClockGetdatefieldsObjCmd’:
/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c:385:
warning: integer constant is too large for ‘long’ type
/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c: In
function ‘ConvertLocalToUTCUsingC’:
/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c:578:
warning: integer constant is too large for ‘long’ type
/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c: In
function ‘ConvertUTCToLocalUsingC’:
/home/CVS/tcl_SF_clean/unix/../generic/tclClock.c:778:
warning: integer constant is too large for ‘long’ type
kennykbplain2005-12-02 05:46:11
Logged In: YES 
user_id=99768

Between us, we've managed an aggregate 4x speedup in
[clock format] this week.  Not too bad.
Log in (anonymous is fine) to add a comment.

Attachments: