Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible typo in performance comparison #33

Open
avi-cenna opened this issue Jul 23, 2024 · 2 comments
Open

Possible typo in performance comparison #33

avi-cenna opened this issue Jul 23, 2024 · 2 comments

Comments

@avi-cenna
Copy link

I was reading this section of the Modern Polars article, and I think there's an issue with the claim that Polars is 150x faster. That number doesn't seem to align with the results in the code blocks where the %%time command is used to produce timings.

@kevinheavey
Copy link
Owner

Yeah this is a vague estimate because it's different every time I run it

@avi-cenna
Copy link
Author

I just checked again and this is the difference.

Polars:

CPU times: user 1.78 s, sys: 197 ms, total: 1.98 s
Wall time: 216 ms

Pandas:

CPU times: user 3.55 s, sys: 347 ms, total: 3.9 s
Wall time: 3.9 s

So polars is about 18 times faster, if we're looking at wall time. That's pretty far from 150x. For the sake of clarity, I think it might be helpful to the reader to give an explanation of the difference between wall time and CPU time and clarify that you're specifically comparing wall time. I actually didn't even notice that you were comparing the wall time until just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants