Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-04-20
13:12 • Closed ticket [1515234fff]: Removing commas is slimming! plus 7 other change... artifact: 576852f05f user: kennykb
2006-08-10
00:54 • Ticket [1515234fff]: 2 changes artifact: a6202a4465 user: dgp
2006-08-06
06:26 • Ticket [1515234fff]: 1 change artifact: 96dfe70b17 user: dkf
2006-06-30
23:41 • Add attachment unnecesary_commas.txt to ticket [1515234fffffffff|151523... artifact: be236bd84c user: afredd
23:41 • Ticket [1515234fff] Removing commas is slimming! status still Open with 4 ot... artifact: 5fc0c565b4 user: afredd
16:41 • New ticket [1515234fff]. artifact: 6de0c62603 user: afredd

Removing commas is slimming!

Closed / Accepted1515234fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-06-30 16:41:46
There are a large number of cases where string literals
passsed to vararg functions are split over multiple
lines but with a comma separating them. The most common
are in calls to Tcl_AppendResult.

By removing the comma separating the string literals,
you save all round:

* smaller object code (one less function argument
 to push)
* one less '\0' in the strings table
* faster run time (one less time round the varargs
handling code)
* smaller source code!

Attached is a file containing all the occurences i
could grep out of the Tcl source (there are more in
Tk too) plus a patch for the first file in the list.
I'll submit patches for the rest if someone's
willing to apply them... although the changes are
absurdly trivial :-)
afreddplain2006-06-30 23:41:47
File Added - 183455: unnecesary_commas.txt
dkf Ticket [1515234fff]: 1 change [History diff]2006-08-06 06:26:27
dgp Ticket [1515234fff]: 2 changes [History diff]2006-08-10 00:54:19
kennykbplain2007-04-20 13:12:28
Logged In: YES 
user_id=99768
Originator: NO

Sure, couldn't hurt.  Unlikely to help much, but might as well put it in.
Log in (anonymous is fine) to add a comment.

Attachments: