all 4 comments

sorted by: hot top controversial new old
[–] 5 points 2 years ago*

Since it's running mypyc (https://mypyc.readthedocs.io/en/latest/index.html ) on the imports under the hood, I'm struggling to see why you'd want to limit yourself to the standard library instead of just compiling your whole program as a module with mypyc directly?

At the same time, if the gains are consistent, I also feel that CPython should just compile an entire standard library on installation.

EDIT: benchmarks for mypyc look impressive, only exceptions are slower:

  • source
  • [–] 3 points 2 years ago (1 child)

    Hmmm. Interesting. Why not a project that just simply writes the (Python parts of the) standard library in C directly?

  • source
  • hideshow 2 child comments
  • [–] 4 points 2 years ago (1 child)

    Many, many parts of the standard library are written in C. Most performance critical parts are.

    Do you need a pre-compiled tomllib? If you are using toml a lot, maybe. But chances are that you aren't reading a lot of toml files, and if you are, then you're probably already using rtoml.

  • source
  • parent
  • hideshow 2 child comments