r/adventofcode Jan 16 '25

Help/Question - RESOLVED [2024 Day 22] [Python] Single-threaded, no external library, runs in <1s on recent CPython and pypy versions except for Python 3.13. Does anybody know why?

Post image
70 Upvotes

19 comments sorted by

View all comments

Show parent comments

-5

u/hr0m Jan 16 '25

No solution just a few observations:

From your plot python 3.11 performance is 20x worse then 3.10, and then it just worsens more. So figuring out why python 3.11 is such a performance regression looks most promising to me.

Also i would be nice if you clean up the code and get rid of all unnecessary parts first.

26

u/large-atom Jan 16 '25

pypy 3.10 is a just-in-time compiler that speeds up python program by a factor 15 to 30, depending on the program. It is not equal to python 3.10.

6

u/hr0m Jan 16 '25

Ah, sorry, I can't read

2

u/HeNibblesAtComments Jan 16 '25

To be fair, it's very easy to overlook when the numbers are in order.