Skip to content

Commit

Permalink
Remove speed comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
markfairbanks committed Oct 28, 2024
1 parent 4cd6f16 commit 05bc520
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,49 +141,6 @@ To convert from a pandas `DataFrame` to a tidypolars `tibble`:
df = tp.as_tibble(df)
```

## Speed Comparisons

A few notes:

* Comparing times from separate functions typically isn't very useful. For example - the `.summarize()` tests
were performed on a different dataset from `.pivot_wider()`.
* All tests are run 5 times. The times shown are the median of those 5 runs.
* All timings are in milliseconds.
* All tests can be found in the source code
[here](https://github.com/markfairbanks/tidypolars/blob/main/benchmarks/benchmarks.ipynb).
* FAQ - Why are some `tidypolars` functions faster than their `polars` counterpart?
+ Short answer - they're not! After all they're just using `polars` in the background.
+ Long answer - All python functions have some slight natural variation in their execution time.
By chance the `tidypolars` runs were slightly shorter on those specific functions on this
iteration of the tests. However one goal of these tests is to show that the "time cost" of
translating syntax to `polars` is very negligible to the
user (especially on medium-to-large datasets).
* Lastly I'd like to mention that these tests were not rigorously created to cover all angles equally. They are just meant to be used as general insight into the performance of these packages.

```python
┌─────────────┬────────────┬─────────┬──────────┐
│ func_tested ┆ tidypolars ┆ polars ┆ pandas │
------------
str ┆ f64 ┆ f64 ┆ f64 │
╞═════════════╪════════════╪═════════╪══════════╡
│ arrange ┆ 752.298750.386768.677
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ case_when ┆ 134.716135.72184.105
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ distinct ┆ 40.68342.03270.724
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
filter30.34630.163216.383
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ left_join ┆ 889.414900.9662723.635
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ mutate ┆ 15.9768.51378.746
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ pivot_wider ┆ 40.91542.768144.66
├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┤
│ summarize ┆ 78.79568.275300.896
└─────────────┴────────────┴─────────┴──────────┘
```

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

0 comments on commit 05bc520

Please sign in to comment.