Minor optimisation to BinaryProc
Closed / Accepted1530262fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-07-28 09:54:33
Replacing the for loop in BinaryProc (which is used to copy characters from one buffer to another) with a memcpy provides a minor speed up. Justication: BinaryProc is often used on channelBuffer's ie. srcLen is often 4096, and memcpy is much quicker than a for loop in such cases (i measure it at about 10x). It seems like a memcpy() is faster that a for loop whenever more than ~16 characters are copied, which is probably the most common case in calls to BinaryProc.
afreddplain2006-07-28 16:54:34
File Added - 186554: tclEncoding.c-patch
dgp Ticket [1530262fff]: 1 change
[History diff]2006-07-31 12:47:47
dkf Ticket [1530262fff]: 1 change
[History diff]2006-08-06 06:25:20
dgpplain2006-08-10 01:13:07
Logged In: YES user_id=80530 looks fine to me; tests ok. memcpy() already used throughout Tcl sources. committed to both active branches.
Log in (anonymous is fine) to add a comment.
Attachments:
- tclEncoding.c-patch [download] added by afredd on 2006-07-28 16:54:34. [details]