lanl / lanl/singularity-eos

Consider replacing ternary expressions with multiplicative conditionals

Open
#319 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue Performance
Dominant language
C++
Stars
39
Forks
22
Avg merge
10h 22m
Merged PRs (30d)
3

Description

Per @Yurlungur we may want to replace

x = cond ? a : b

with

x = (cond) * a + (1 - cond) * b

to reduce branching and improve GPU performance.

This might be premature optimization, but it also might be a good way to specify default handling of NaNs as well.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

The issue names no files or tests; start by locating the C++ ternary expressions targeted for replacement and reviewing their GPU performance impact. Establish benchmarks for branching versus multiplicative conditionals, including NaN behavior, and define completion only after the scope and measured benefit are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.