Message400394
> The big time consumer is turning marshal'ed code objects back
> into Python objects, though. If that could be made faster by
> e.g. using a more efficient storage format such as one which is
> platform dependent, it'd be a much bigger win than the freezing
> approach.
I've explored a couple of different approaches here (see the issue Eric linked to and a few adjacent ones) and this is a tricky issue. Marshal seems to be pretty darn efficient as a storage format, because it's very compact compared to the Python objects it creates. My final (?) proposal is creating static data structures embedded in the code that just *are* Python objects. Unfortunately on Windows the C compiler balks at this -- the C++ compiler handles it just fine, but it's not clear that we are able to statically link C++ object files into Python without depending on a lot of other C++ infrastructure. (In GCC and Clang this is apparently a language extension.) |
|
Date |
User |
Action |
Args |
2021-08-27 03:42:53 | gvanrossum | set | recipients:
+ gvanrossum, lemburg, brett.cannon, ronaldoussoren, eric.snow |
2021-08-27 03:42:53 | gvanrossum | set | messageid: <1630035773.02.0.440792768691.issue45020@roundup.psfhosted.org> |
2021-08-27 03:42:53 | gvanrossum | link | issue45020 messages |
2021-08-27 03:42:52 | gvanrossum | create | |
|