[Python-Dev] More optimisation ideas
Nick Coghlan
ncoghlan at gmail.com
Fri Feb 5 07:33:26 EST 2016
On 5 February 2016 at 15:05, Steven D'Aprano <steve at pearwood.info> wrote:
> (I'm not even sure if this suggestion makes sense, since I'm not really
> sure what "freezing" the stdlib entails. Is it documented anywhere?)
It's not particularly well documented - most of the docs you'll find
are about freeze utilities that don't explain how they work, or the
FrozenImporter, which doesn't explain how to *create* a frozen module
and link it into your Python executable.
Your approach of thinking of a frozen module as a generated .pyc file
that has been converted to a builtin module is a pretty good working
model, though. (It isn't *entirely* accurate, but the discrepancies
are sufficiently arcane that they aren't going to matter in any case
that doesn't involve specifically poking around at the import related
attributes).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list