This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: speed up md5: allow Encode and Decode to inline
Type: Stage:
Components: Extension Modules Versions:
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: donut, loewis
Priority: normal Keywords: patch

Created on 2004-06-21 22:39 by donut, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
python-md5c-Decode+Encode-allow-inlining.patch donut, 2004-06-21 22:39 the patch
Messages (2)
msg46204 - (view) Author: Matthew Mueller (donut) Date: 2004-06-21 22:39
gcc will only inline functions if they are defined
before where they are used.  So this patch just moves
Encode and Decode up to the top of the file.

This can provide a couple percent improvement in speed.
(try -s 'import md5;; d="a"*64'
and -s 'import md5;; d="a"*0x100000'

Decode is only used once, so allowing it to inline
actually reduces the code size, Encode is used twice
but its a pretty small function so it doesn't change
the size much either way..
msg46205 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-03 13:08
Logged In: YES 

Thanks for the patch. Applied as md5c.c 2.9.
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40428
2004-06-21 22:39:17donutcreate