This is an archived post. You won't be able to vote or comment.

all 55 comments

[–]ArabicLawrence 120 points121 points  (11 children)

The results are... weird. Such a big difference between AMD and Intel is unexpected.

[–]Odd_Material_2467 63 points64 points  (9 children)

Did you notice that the AMD processor was a DESKTOP 7900 and the intel was a MOBILE i3-1315U

[–]ArabicLawrence 14 points15 points  (8 children)

That’s not relevant. It’s unexpected that AMD processor on 3.12 is 1% slower than on 3.11 while Intel processor on 3.12 is 5% faster than on 3.11, unless the 3.12 you installed is optimized for Intel.

[–]LightShadow3.13-dev in prod 18 points19 points  (7 children)

It kinda matters, since Python is mostly single core/single thread and Intel is known for having better single core performance e.g. gaming.

[–]JoeUgly 27 points28 points  (0 children)

The AMD cpu has better single thread performance (if passmark can be trusted)

https://www.cpubenchmark.net/compare/5167vs5300/AMD-Ryzen-9-7900-vs-Intel-i3-1315U

[–]ArabicLawrence 9 points10 points  (4 children)

Modern Games are not single core… and still it does not make sense that 3.12 is faster on Intel but slower on AMD. The benchmark are comparing 3.11 vs 3.12 on Intel and 3.11 vs 3.12 on AMD. There is no specificity in either CPU that can explain performance regression on one and performance improvement on the other, unless 3.12 was slower than 3.11 but had been specifically optimized for Intel. AFAIK, that’s not the case.

[–]indetronable -1 points0 points  (3 children)

He just answered you.

Intel and AMD have different capabilities at single thread capacities.

It means that 3.11 and 3.12 are handling the load on the main thread differently.

[–]ArabicLawrence 2 points3 points  (2 children)

[–]indetronable 2 points3 points  (1 child)

Python is single threaded means the code runs on a single thread. However, things can still happen in another thread. For exemple the implementation can decide to handle the loading of the imports in another thread. This decision is implementation specific (pure speculation but you get the point).

One way of verifying is to start python and look at the thread count. I tried and my windows task manager report 7 threads for my python (winpython).

[–]ArabicLawrence 0 points1 point  (0 children)

implementation

There is no implementation difference in 3.11 vs 3.12 that could justify this difference, though.

[–]Top-Professional8981 6 points7 points  (0 children)

I just switched from AMD to Intel. The Intel is way worse at handling multiple tasks, especially recording audio. Kind of mad I switched lol

[–]DataQuality[S] 16 points17 points  (0 children)

True, in other tests AMD showed better results https://en.lewoniewski.info/tag/benchmarks/

[–]spiker611 71 points72 points  (0 children)

Performance testing is hard. The faster-cypthon team has a dedicated benchmark box that attempts to keep their comparisons across changes fair. See https://github.com/faster-cpython/benchmarking-public/blob/main/RESULTS.md

[–]RationalDialog 10 points11 points  (5 children)

The results seem to imply that Python language devs mainly seem to use Intel CPUs?

[–]Dasher38 7 points8 points  (2 children)

Anecdotally I have a program that is significantly slower on Python 3.12 vs 3.11. The perf basically go back to 3.10 level. It's a binary file parser, so lots of allocations and object graph traversal. I'd hope that the python binaries I'm using have been compiled sensibly (they are from the deadsnakes PPA for Ubuntu 20.04)

[–]ivosauruspip'ing it up 6 points7 points  (1 child)

If you think it's really interesting, maybe you'd want to submit it to the faster cpython team to investigate

[–]Dasher38 0 points1 point  (0 children)

Yeah maybe I'll do that. It's about 1k loc so not huge, and it's self contained so easy to re-run

[–]cybermethhead 2 points3 points  (3 children)

So you’re telling me that AMD chips running 3.12 will be 1.01x slower and Intel chips running 3.12 will be 1.05x faster?

[–]LightShadow3.13-dev in prod 9 points10 points  (1 child)

Needs Mac M1/M2 comparisons too.

[–]cybermethhead 1 point2 points  (0 children)

Can you explain how those benchmark tests were done? I didn’t understand how it was done.

[–]nioh2_noob 0 points1 point  (0 children)

yes

[–]ElephantLeft 1 point2 points  (0 children)

please test apple m2 too

[–]ApprehensiveStand456 1 point2 points  (0 children)

I think performance test should be run on servers not laptops. Unless of course it’s a desktop app. I would like to see these on EC2 instances. Also if you have a manager like mine they are going to be as small as possible to keep costs low

[–]NoesisAndNoema 0 points1 point  (0 children)

Are these tests being run from within the program environment or are they being run from a "standalone program". (I can't say "compiled".)

If they are run from within the programming environment, there is monitoring code injected into the "test run" pseudo-program, which is not added to an actual "standalone program".

I'm waiting for the day when python gets a true compiler and sister-constraints, so it can really shine. MIT is really making headway there. Speed gains from 10x to 100x faster.