I have two pc, one is Intel i7 13700KF with 64GB RAM and another is AMD 3970X with same RAM, both pc use ssd as storage and both pc has python 3.11 and polars 0.20.5. I run code below:
df = pl.DataFrame({
"name": ["a"+str(i) for i in range(1000000)],
"age": [i for i in range(1000000)]
})
%%timeit
df.with_columns([
pl.col("name") + "test",
pl.col("age").rolling_mean(20)
])
And I find intel get 12.9 ms ± 20.8 µs per loop while amd get 24.8 ms ± 270 µs per loop
The cpu benchmark is close for these two cpu. Why there is such big difference?
Also I found when you do a little calculation on Apple M3 Max, it could be beaten by intel i7 13700KF, but when you do a lot of polars work like 20-30x with_columns, M3 Max would beat intel i7 13700KF.