Kotlin / Kotlin/dataframe

`Update` performance

Open
#282 5 comments 0 reactions 1 assignee Assigned to @Jolanrensen View on GitHub
performance
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Looking into the implementation of `Update`, it seems to me that the filtering of rows happens again and again for each column while this could be a one-time operation.

As a broad overview, the current situation looks like:
```kotlin
fun updateImpl() {
df.replace(columns).with { it: DataColumn -> /* filter, given entire df row and replace column */ }
}
```
while it could be
```kotlin
fun updateImpl() {
df.filter { /* Filter rows */ }.replace(columns).with { it: DataColumn -> /* replace column */ }
}
```

There is of course also a trade-off, because this doesn't work with `Update.perCol {}`, since it would supply a filtered column instead of the entire column like now. So we need to think this through thoroughly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.