Optimize i = !is.na(...)

Open
#1,386 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data, performance

Research direction

Start by tracing data.table's implementation of i = !is.na(...) and :=, using the linked Stack Overflow example as the behavioral reference. Identify tests covering this expression and measure its current working-memory use; done means the fused operation preserves the result without allocating two columns of working RAM.

Written by the indexing model from the issue text.

Description

enhancement performance

Loop fuse so that it doesn't churn through 2 column's worth of working RAM. In fact, no working RAM is needed at all if it does the := as well as it loops through i. So fuse the i into the := step too.
http://stackoverflow.com/a/33024625/403310

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.