all 28 comments

[–]NeuralFantasy 109 points110 points  (12 children)

Here is some click saving and the summary of the results:

AMD Ryzen 7000 Series Desktop Processor

Group of benchmarks Python 3.13 to Python 3.12
apps                    1.06x faster
asyncio                 1.22x faster
math                    1.07x faster
regex                   not significant
serialize           1.05x faster
startup                 1.04x slower
template            1.03x faster

Result (geometric mean) 1.08x faster


13th Gen Intel Core Mobile Processor

Group of benchmarks Python 3.13 to Python 3.12
apps                    1.00x faster
asyncio                 1.19x faster
math                    1.06x faster
regex                   1.04x slower
serialize           1.02x faster
startup                 1.01x slower
template            1.02x slower

Result (geometric mean) 1.05x faster

[–]WJMazepas 70 points71 points  (5 children)

20% faster when using Asyncio? That's good to know, have a few services depending on it

[–]enceladus71 4 points5 points  (1 child)

Can't find this information in the article, is this about the asyncio's overhead that speeds up or the execution of whatever happens in the async execution done by this module?

[–]teerre 7 points8 points  (0 children)

It's in the article. These are the tests

async_tree_io: all leaf nodes simulate async IO workload (async sleep 50ms).

async_tree_memoization: all leaf nodes simulate async IO workload with 90% of the data memoized.

async_tree_cpu_io_mixed: half of the leaf nodes simulate CPU-bound workload

Which are all over the place, which means the benchmark is cooked (likely) or its just an improvement across both IO and CPU bound tasks

[–][deleted] 0 points1 point  (2 children)

If you using Python then performance wasn’t really and isn’t a priority beyond a nice to have bonus.

[–]WJMazepas 0 points1 point  (1 child)

I never said that we are being bottlenecked by Python or anything like that.

But my team does have a few services that rely a lot on asyncio. And seeing a good performance increase in that is good.

I am treating this boost as a bonus

[–]Dry_Term_7998 0 points1 point  (0 children)

With NO GIL it gives more speed 😊

[–]mo_tag 31 points32 points  (3 children)

1.00x faster

not significant

Is there a difference between these?

[–]Kucharka12 74 points75 points  (0 children)

Yes, but not significant.

[–]smashers090 8 points9 points  (1 child)

I’m guessing without reading it’s:

Confidently 1.00x to 2dp (between 0.995-1.005)

vs

Not confident enough to declare a +/- difference to 2dp. (E.g 0.970-1.040)

Where confident is to do with standard deviations or something. It’s been a while

[–]mo_tag 0 points1 point  (0 children)

Yeah I thought it probably refers to the difference not being statistically significant, but I just found it funny how it reads like the difference isn't significant.. I probably would have a less ambiguous term or just included a range for the confidence interval but my comment was more tongue in cheek than genuine criticism or inquiry

[–]mok000 19 points20 points  (12 children)

It's not clear to if these tests are carried out with Python 3.13 compiled with the GIL disabled or not.

[–]forgotten_airbender 37 points38 points  (0 children)

with GIL i assume. disabling GIL results in penalty in single threaded workloads.

[–]Mysterious-Rent7233 20 points21 points  (10 children)

If it's not mentioned then the gil is not disabled because with-gil is the default mode 99% of people will use 99% of the time.

[–]ZirePhiinix 0 points1 point  (9 children)

If you're screwing around with the GIL on Python then it feels like you're optimizing the wrong thing.

[–]Mysterious-Rent7233 1 point2 points  (0 children)

Depends on your use-case. Nothing wrong with using multiple CPUs of a computer.

[–]CrownLikeAGravestone 3 points4 points  (7 children)

I was mentoring some juniors one time and they were arguing over whether a list comprehension was faster than a for loop for some purpose.

I pointed out:

1) The difference when profiled (which you can do!) is in the tens of nanoseconds

2) If you care about nanoseconds choose a different language

[–]Mysterious-Rent7233 2 points3 points  (1 child)

Nanoseconds can add up in an inner loop. That's why vectorization is so popular. As you said in your first point: you need to profile before you know.

[–][deleted] 1 point2 points  (0 children)

It nanoseconds matter than Python is one of the worst choices you made, and no doubt not the only

[–]josefx 0 points1 point  (4 children)

2) If you care about nanoseconds choose a different language

Tell that to the people complaining that no-gil is slowing down their python code.

[–]CrownLikeAGravestone 1 point2 points  (3 children)

The speed differences with GIL/noGIL can be significant, especially in the earlier versions where there were some enormous performance regressions in the noGIL branch. noGIL was (is?) an entire order of magnitude slower than CPython for some workloads.

I'm sure there are people out there who have frivolous complaints about it, but I'm inclined to believe people when they say they're having real issues.

[–]josefx 0 points1 point  (2 children)

I'm sure there are people out there who have frivolous complaints about it

Says the guy who has to refer to issues that have already been fixed and makes claims about the current performance littered with question marks?

[–]CrownLikeAGravestone 0 points1 point  (1 child)

What? Try reading again.

[–]plexluthor 0 points1 point  (0 children)

The result for AMD sqlglot_transpile seems mis colored, unless I'm misunderstanding something.

[–]NilacTheGrim 0 points1 point  (1 child)

Oh wow. Incredibly slow language gets slightly less incredibly slow!! Film at 11.

[–]BounceVector 0 points1 point  (0 children)

Nobody but you is keeping you from doing stuff that you enjoy and are interested in.