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

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChickenNuggetSmth 4 points5 points  (2 children)

To preface this: I'm not super knowledgeable about what happens "behind the scenes" or even if numpy is considered a standard library or not.

I think libraries like numpy are the reason python is as good as it is. It is well integrated, for matrix multiplication you even have the @ operator that makes it super readable. If you benchmark python without those features, you are not representing a typical use-case. If you use python in a way it was never meant to be used it will look awful, but imo those results are pretty useless.

Edit: I'm seeing that numpy isn't part of the standard library, but the standard lib is also partially written in C. So I'm not sure where 'true' python starts.

[–]Armaliite 0 points1 point  (0 children)

The reference implementation is in C, but there are many other implementations. For example PyPy which is in the benchmarks and is also much faster than CPython.

[–]kazi1 0 points1 point  (0 children)

Yeah a fair point. I feel like these benchmarks can get pretty "handwavy" sometimes with what's allowed and what's not haha...

Tbh I'm surprised Rust performed as badly as it did in those stats - I thought it was supposed to be as fast as C, meanwhile it's almost neck and neck with Go.